On 05/03/2015 08:07, Yasuo Ohgaki wrote:
So array functions are subject to be changed.

bool in_array  ( mixed $needle  , array $haystack  [, bool $strict  ] )
Renamed to array_in() and fix order.

mixed array_search  ( mixed $needle  , array $haystack  [, bool $strict  ] )
Renamed to array_find() and fix order.

bool array_key_exists ( mixed $key , array $array )
Renamed to array_key_find() and fix order.

array array_keys ( array $array [, mixed $search_value [, bool $strict =
false ]] )
OK as it is now.

implode() may be changed to have
string implode ( string $glue , array $pieces )
always.

If we do create new array functions I think it should be thought through a bit more than just cleaning up the arg order. For example we could support Traversable as well. Then at least it'd bring some value beyond consistency for the sake of it.

Cheers

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to