RE: [PHP-DEV] array_has_more
| From: | James Cox | Date: | Sun, 06 Jul 2003 18:26:06 +0000 |
| Subject: | RE: [PHP-DEV] array_has_more | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3275@lists.php.net to get a copy of this message | ||
>
> The problem isn't the ending. The problem is that according
> to our naming conventions it should be array_foobar() whereas the
other
> array functions were invented before our conventions and are short
names such
> as next(). Now on one hand we wouldn't want to pollute the PHP
function
> space with new non-conforming function names but on the other hand it
is
> really ugly to have a new function which looks completely different
from the
> original ones...
>
You could turn around it's output and call it array_complete, so:
if (array_complete($arr)) {
return "no more elements";
} else {
return "more elements available";
}