At 03:49 AM 4/27/2004 +0000, Curt Zirzow wrote:>$a = 'a string'; /* E_ERROR Cannot use string offset as an array */ echo is_array($a['bar']['baz']);
I made this change back in December. I guess I could revert back but I think it makes sense to be strict here. What does the rest think?
My feeling is that the is_*-functions should be forgiving as people *are* doing checks to ensure proper input values. To force a combination or isset and is_* seems to be the wrong thing to me. But I realize that the issue here happens because is_* are normal functions and the check is done beforehand. Nevertheless I'd prefer not to have to guard is_* with isset in my ideal PHP world :-)
On one hand it's not that important to me though as it only happens under rare circumstances. On the other hand it leads to very subtle BC problems as you can hit it depending on user input in a form if you use nested arrays there. So I'm 50:50 on reverting.
- Chris
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php