Toby on :
Hi Ilia,
I love your patch, especially the object and scalar type hints, as well as strict type hints for every scalar type. Still, I have some questions about it:
- How does the float type hint react on ints? It should be valid to submit an int as a float, without casting it explictly, IMO.
- How do type hints interact with casting in the method/function declaration? Is it possible to mix them?
- How do casts get reflected? Do they also indicate the casted type through reflection?
Thanks a lot for your efforts in this direction!
Regards,
Toby
I love your patch, especially the object and scalar type hints, as well as strict type hints for every scalar type. Still, I have some questions about it:
- How does the float type hint react on ints? It should be valid to submit an int as a float, without casting it explictly, IMO.
- How do type hints interact with casting in the method/function declaration? Is it possible to mix them?
- How do casts get reflected? Do they also indicate the casted type through reflection?
Thanks a lot for your efforts in this direction!
Regards,
Toby
Do You PHP ??? on : [PHP]Type hinting/casting request for vote