Hi, Le 26/12/2015 21:35, Elijah Johnson a écrit :
Can you explain your statement that this would be a huge and complex work? You must mean that there would be multiple places in the php source code where variables are assigned? I'm not yet discussing performance, but only the aspect of adding the feature.
There may other options I don't know but, AFAIK, this implies adding an optional type hint at the zval level. This type hint should be verified at least before each conversion. Copy-on-write is an other issue, as it is currently not compatible with zval type hints. Seeing only variables with well-defined names, and focusing on arrays, only scratches the surface. Everything happens at the zval level. So, IMO, attaching type hints to variables and properties is a huge and complex work.
Regards François -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php