Hi!

Seeing how you work for zend I thought maybe you have used the zend framework = ) Sorry in my example I used "int" instead of "numeric", but my point is the same, grep in zend framework for is_bool.

It might come as a surprise to you, but I did not write whole Zend Framework personally :) Moreover, as even more surprise I did not even inspect personally each line of code. As a final shock, I am not convinced functions in PHP should throw exceptions when parameters don't match - and even if they do, first they should attempt to make sense of parameters (which makes string hints like "integer" and "string" make no sense - you can convert a lot of things to int or string). Even if they can't, it's much better to be handled on user code level with error message that makes sense and way that makes sense for application - but I could kind of live with the scenario where these hints would work as internal function types work now. However, that's not what is proposed - what is proposed is that if you've got int typehint, '1' would be rejected. Having such restriction makes no sense and goes contrary to what PHP and dynamic languages in general are.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to