Re: [PHP-DEV] RFC array functions

2006-06-04 Thread Marcus Boerger
Hello Eric again, forget the last mail, you're right it is hasNext() in php, too. So it should be array_has_next() as well. Thanks to michael for reminding me. I got confused with the original implementation (i shouldn't have changed the name). best regards marcus Sunday, June 4, 2006, 1:39:04

Re: [PHP-DEV] RFC array functions

2006-06-04 Thread Marcus Boerger
Hello Eric, our iterators have next() and valid() in separate functions. That alone makes them way more powerful then java' iterators. In SPL we have an iterator wrapper called CachingIterator that has a method has_more() which has a boolean return value that allows to check whether a call to ne

Re: [PHP-DEV] RFC array functions

2006-06-04 Thread Eric Fredj
Hi, Took from Java world, it could be something like array_has_next() which is more significant because return boolean is only about the next value not about all the next values. On 6/3/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: Hello Andi, Wednesday, May 31, 2006, 5:28:47 AM, you wrote:

Re: [PHP-DEV] RFC array functions

2006-06-03 Thread Marcus Boerger
Hello Andi, Wednesday, May 31, 2006, 5:28:47 AM, you wrote: > Zeev and I designed each() to deprecate key()/current()/etc. which > came from PHP/FI 2. Maybe not exactly what you're looking for but > just want to point out that there have always been some issues with > the latter functions. > I

Re: [PHP-DEV] RFC array functions

2006-05-30 Thread Andi Gutmans
At 01:00 PM 5/30/2006, Pierre wrote: On Wed, 31 May 2006 00:58:34 +0500 [EMAIL PROTECTED] ("Alexander Pak") wrote: On 5/30/06, Alexander Pak <[EMAIL PROTECTED]> wrote: > As for me I don't really like "array_has_more" name.. maybe array_end? I find *end confusing as well. array_has_more is unamb

Re: [PHP-DEV] RFC array functions

2006-05-30 Thread Andi Gutmans
Zeev and I designed each() to deprecate key()/current()/etc. which came from PHP/FI 2. Maybe not exactly what you're looking for but just want to point out that there have always been some issues with the latter functions. If each() isn't suitable (and/or you want something quicker) than I'm OK

Re: [PHP-DEV] RFC array functions

2006-05-30 Thread Pierre
On Wed, 31 May 2006 00:58:34 +0500 [EMAIL PROTECTED] ("Alexander Pak") wrote: On 5/30/06, Alexander Pak <[EMAIL PROTECTED]> wrote: > As for me I don't really like "array_has_more" name.. maybe array_end? I find *end confusing as well. array_has_more is unambiguous and perfectly matches the functi

Re: [PHP-DEV] RFC array functions

2006-05-30 Thread Alexander Pak
As for me I don't really like "array_has_more" name.. maybe array_end? On 5/31/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: Hello internals, just as a reminder for those that insist on being heared - you have been heared. Here is your second try. I am not going to wait till the dawn of time

Re: [PHP-DEV] RFC array functions

2006-05-30 Thread Marcus Boerger
Hello Pierre, Tuesday, May 30, 2006, 9:39:44 PM, you wrote: > On 5/30/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: >> Hello internals, >> >> just as a reminder for those that insist on being heared - you have been >> heared. Here is your second try. I am not going to wait till the dawn of >> t

Re: [PHP-DEV] RFC array functions

2006-05-30 Thread Pierre
On 5/30/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: Hello internals, just as a reminder for those that insist on being heared - you have been heared. Here is your second try. I am not going to wait till the dawn of time. It is a long process but we will get somewhere. One or two work days

Re: [PHP-DEV] RFC array functions

2006-05-29 Thread Kevin Waterson
This one time, at band camp, Marcus Boerger <[EMAIL PROTECTED]> wrote: > Hello Jared, > > > UPS i see my failure in writing. I meant array_valid($array) of course :-) > > i have always been better in writing patches then telling tales. I like the idea of an SPL feel to array functions Kevin

Re: [PHP-DEV] RFC array functions

2006-05-27 Thread bertrand Gugger
Matthew C. Kavanagh wrote: Pierre wrote: On 5/27/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: - bool array(array $array) cehcks whether arra position is valid (e.g. like "key($array) !== NULL") I don't understand this one. I think you have to listen to psychedelic music and take a

Re: [PHP-DEV] RFC array functions

2006-05-27 Thread Pierre
On Sat, 27 May 2006 23:52:41 +0200 [EMAIL PROTECTED] (Marcus Boerger) wrote: > Hello Matthew, > > Saturday, May 27, 2006, 11:36:16 PM, you wrote: > > > Pierre wrote: > >> On 5/27/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: > >>> - bool array(array $array) > >>> > >>> cehcks whether arra posi

Re: [PHP-DEV] RFC array functions

2006-05-27 Thread Marcus Boerger
Hello Jared, UPS i see my failure in writing. I meant array_valid($array) of course :-) i have always been better in writing patches then telling tales. best regards marcus >> - bool array(array $array) >> >> cehcks whether arra position is valid (e.g. like >> "key($array) !== NULL") >

Re: [PHP-DEV] RFC array functions

2006-05-27 Thread Marcus Boerger
Hello Matthew, Saturday, May 27, 2006, 11:36:16 PM, you wrote: > Pierre wrote: >> On 5/27/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: >>> - bool array(array $array) >>> >>> cehcks whether arra position is valid (e.g. like "key($array) !== >>> NULL") >> >> I don't understand this one. >> >

RE: [PHP-DEV] RFC array functions

2006-05-27 Thread Jared Williams
> -Original Message- > From: Marcus Boerger [mailto:[EMAIL PROTECTED] > 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

Re: [PHP-DEV] RFC array functions

2006-05-27 Thread Michael Wallner
Pierre wrote: On 5/27/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: - bool array(array $array) cehcks whether arra position is valid (e.g. like "key($array) !== NULL") I don't understand this one. I think he meant valid() or array_valid(). -- Michael -- PHP Internals - PHP Runtime D

Re: [PHP-DEV] RFC array functions

2006-05-27 Thread Matthew C. Kavanagh
Pierre wrote: On 5/27/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: - bool array(array $array) cehcks whether arra position is valid (e.g. like "key($array) !== NULL") I don't understand this one. I think you have to listen to psychedelic music and take a hit of LSD first. -- PHP Inter

Re: [PHP-DEV] RFC array functions

2006-05-27 Thread Pierre
On 5/27/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: 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 a big +1 :)