Zitat von Ilia Alshanetsky <[EMAIL PROTECTED]>: > <?php > $a = null; > sort($a); > ?> > > Majority (if not all) array function, will error out when they encounter > a > variable that is not array when an array argument is expected. If > anything > this patch add consistency that helps to make code clearer. Heck, Is > suspect > a far number of people will be able to find bugs in their code because > they > will now be warned that a function is getting a string/null/etc... > instead > silently accepting any argument.
I never said that the current behaviour is in any way consistent. But which behaviour the more logical one is, is debateable. Many languages support context dependant implicit casting, and PHP even says so explicitely in the manual. Why should this now be incorrect, not logical or not "proper"? You can safely argue the opposite, namely that no array function should raise a warning but instead cast the value to an array. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php