jason davidson wrote:
Unfortunately, in_array() cannot be modified since this will break BC.
I like the idea of passing an array of needles, I wonder if you could just add the ability to pass a needles array to in_array, rather than create a new function.
Anyways, it adds flexability, I would use it.
Jason
Consider this example :
php -r '$a = array(1, 2); $haystack = array("string", array(1, 2), 5.5); var_dump(in_array($a, $haystack));'
So, in_array() checks for everything, including arrays, starting PHP5 it can look for objects too. So the BC is that till now an array as first parameter is quite ok therefore
it cannot be changed.
Andrey
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php