> De : Stanislav Malyshev [mailto:smalys...@gmail.com] > > Adding another concept, not changing the existing ones. And really, > > it's just simplifying what is already present via is_<typename>() > > runtime checks, making our lives a little bit easier. > > There's a very big difference between allowing to check types (and then > do whatever you wish) and having functions throw fatal errors if types > do not match.
+1. Checking IS_<type> at the C level after implicit conversions and checking this at the PHP level are very different. IMHO, the key point is the concept of 'type'. Strict typing considers a one-to-one correspondence between PHP types and zval types, which is nonsense. At the PHP level, any value returning true through is_numeric() IS a 'number', and it must remain so. Any such value with a null decimal part is an 'integer' (not the result of 'is_int()') and so on. As long as we don't agree on 'smart' high-level types and the corresponding matching rules against zval type and value, we won't agree on anything. This is what I am currently defining in the upcoming DbC RFC. Hopefully, a first version will be released tomorrow, depending on Yasuo's and Dmitry's opinion. Cheers François -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php