Hello again!
Now with both parameter and return value type hints.
For parameter type hints, i have completed the actual implementation
with the leftover php types:
- string (binary string and unicode)
- integer (accepting numeric string too)
- double (accepting numeric string too)
- boolean ('0', '1', true, false)
- resource
- object
(Yes, following our dynamic typing)
Since then, the patch also includes new methods to Reflection:
- isInt()
- isDouble()
- isBool()
- isString()
- isObject()
- isResource()
And for return value, i have modified and improved the previous patch,
and now it is using only the "(type)" notation. Hence, that
implementation doesn't make any BC break.
Examples, patches and tests: http://wiki.php.net/rfc/typehint
Thanks.
--
Regards,
Felipe Pena.