Hi! > How is coercive much smarter? Basically what coercive would do is
It can accept 2.0 but not 2.5. Explicit cast is a sledgehammer - it would convert both to 2. > How casting (int) could be such dangerous thing? Lets take for example > this code: > > echo (int) "whats cooking!"; > echo intval("whats cooking"); > > Both statements print 0, so how is casting unsafe??? Casting by itself is not dangerous. What is dangerous is using casting to work around type system - since in this case it could hide an error (such as passing string "whats cooking!" to function requiring integer). Of course, you can say such errors are of no importance to you - in which case you should never use typed parameters at all and you'll be fine :) (mostly) -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php