array position isfirst / islast / valid ?
| From: | Oskar Eisemuth | Date: | Sat, 02 Jan 2010 16:47:10 +0000 |
| Subject: | array position isfirst / islast / valid ? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-46593@lists.php.net to get a copy of this message | ||
Hello
Would it be possible to add functions to know the relative internal array position?
I found "[PHP-DEV] RFC array functions" from 2006, but nothing really changed.
The need to use next, prev in combination is ridiculous compared to a clean array_hasmore or array_pos_islast, as the internals already know this.
To get an array_valid_position or array_pos_isvalid wouldn't be bad either.
So would it possible to introduce:
array_pos_isfirst(& $array)
array_pos_islast(& $array)
array_pos_isvalid(& $array)
Best regards
Oskar Eisemuth