RE: [PHP-DEV] RFC array functions
| From: | Jared Williams | Date: | Sat, 27 May 2006 21:53:28 +0000 |
| Subject: | RE: [PHP-DEV] RFC array functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23730@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Marcus Boerger [mailto:helly@php.net]
> Sent: 27 May 2006 22:28
> To: internals@lists.php.net
> Subject: [PHP-DEV] RFC array functions
>
> Hello internals,
>
> i'd like to add two array functions:
>
> - bool array_has_more(array $array)
>
> checks whether $array has more elements after current position or
> if array is at last position, preferable working inside foreach
Useful.
> - bool array(array $array)
>
> cehcks whether arra position is valid (e.g. like
> "key($array) !== NULL")
How do you disambiguate between this and
$array = array('foo', 'bar');
$anotherArray = array($array);
making array(0 => array(0 => 'foo', 1 => 'bar'))
Jared