Hi Thanks for taking time to look into this.
[EMAIL PROTECTED] (Red Wingate) writes: > this is a plain design fault on your side: I'm sorry, but I don't agree. It is standard in PHP4, and one of the advantages of having a type loose programming language. > Now this makes sense as you first of all would make sure if $a is an > array and not start with the first index ( which doesn't exist as $a > is not even an array ) I understand what the logic behind is, and actually your example, does not give a fatal error as $['foo'] returns a char, and you can call is_array with that. Furthermore it's inconsistent, as it behaves differently depending on which function you call. In PHP4 this is valid $my_array = $some_weird_function_that_returns_a_multidim_array(); if(is_array($my_array['some']['special']['value']['that']['i']['need'])) { apply_logic(); } in PHP5, in order not to risk a fatal error, this would have to be: $my_array = $some_weird_function_that_returns_a_multidim_array(); if( is_array($my_array['some']) && is_array($my_array['some']['special']) && is_array($my_array['some']['special']['value']) && is_array($my_array['some']['special']['value']['that']) && is_array($my_array['some']['special']['value']['that']['i']) && is_array($my_array['some']['special']['value']['that']['i']['need']) ) { apply_logic(); } IMHO that's not very nice. You could argue that ending up in situations like this is bad design, still it's valid in PHP4. You cannot even encapsulate in a function, because that gives a fatal error when you call the function (which makes sense). I find this to be a problem, because it makes it hard to migrate scripts from PHP4, and I'd rather spend my time using the new object model and XML support, than going through old scripts to make sure they comply with a new behaviour which I see no good reason for. -- ./mvh Christian Jul Jensen Frelance webprogrammer TYPO3 Typehead Denmark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php