> I don't think any error message should be thrown during implicit array > creation. Not having to define your variables is one of the main principles > of the PHP language. I definitely don't think this should be changed. I > also don't see how this differs very much from a regular assignment to an > undefined variable (e.g. $var = 2; ). > It differs in that if $var is already defined, doing $var = 2; COMPLETELY overwrites it. However if $array is already defined, then $array[] ADDS to it. I see implicit array creation as "bad" in the same way that register_globals is "bad".
That is to say, it's not inherently evil, just prone to unexpected behavior when not used correctly. > I think making this an error, even an E_STRICT is a very bad move. > Then we differ on that. Because I think it would be a useful tool for helping the conscientious scripter avoid little, but potentially harmful mistakes. -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php