Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23915 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90492 invoked by uid 1010); 4 Jun 2006 11:17:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90477 invoked from network); 4 Jun 2006 11:17:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jun 2006 11:17:59 -0000 X-PHP-List-Original-Sender: eofredj@gmail.com X-Host-Fingerprint: 64.233.162.206 nz-out-0102.google.com Linux 2.4/2.6 Received: from ([64.233.162.206:53158] helo=nz-out-0102.google.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C7/B1-49656-661C2844 for ; Sun, 04 Jun 2006 07:17:59 -0400 Received: by nz-out-0102.google.com with SMTP id m22so847072nzf for ; Sun, 04 Jun 2006 04:17:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=mJWCNmyD1rX+eYWf44cLqstIBLykQksRHDjE4UFKTZVpoS8FqUylgx9eSkgtOUvuThaz0jt5CzqRJnyp20UDreW4ZAxwgyq9WSiOrC8OgW6qUNIY0HwppOXGMxSEwvTrQPQyosiUlHnpL9YDZ7SHzrASblhnCE07ttjaKotq8lY= Received: by 10.36.37.12 with SMTP id k12mr4675558nzk; Sun, 04 Jun 2006 04:17:55 -0700 (PDT) Received: by 10.36.250.44 with HTTP; Sun, 4 Jun 2006 04:17:55 -0700 (PDT) Message-ID: <7e72c4a60606040417t4c094351i22d9868fcbd02b17@mail.gmail.com> Date: Sun, 4 Jun 2006 13:17:55 +0200 To: internals@lists.php.net In-Reply-To: <462553891.20060603123801@marcus-boerger.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14709_16096733.1149419875447" References: <18210000279.20060527232743@marcus-boerger.de> <4478C650.7000403@teh.ath.cx> <1421594360.20060527235241@marcus-boerger.de> <7.0.1.0.2.20060530202530.03871ca8@zend.com> <462553891.20060603123801@marcus-boerger.de> Subject: Re: [PHP-DEV] RFC array functions From: eofredj@gmail.com ("Eric Fredj") ------=_Part_14709_16096733.1149419875447 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 wrote: > > 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. > > If each() isn't suitable (and/or you want something quicker) than I'm > > OK with an array_* function but I don't like array_valid(). It sounds > > too much like is_array() and implies the array is valid. Maybe > > something like array_valid_position()? > > Also good, i just chose the name becuase it's close to Iterator::valid(). > I am however more interested in the array_has_more() thingie. Often enough > one runs into a problem where the last entry of a list has a slightly > different behavior. > > > At 02:52 PM 5/27/2006, Marcus Boerger wrote: > >>Hello Matthew, > >> > >>Saturday, May 27, 2006, 11:36:16 PM, you wrote: > >> > >> > Pierre wrote: > >> >> On 5/27/06, Marcus Boerger 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. > >> > >>Actually the point is that you cannot simply do stuff like > >>"while(key($array))". And "while(key($array) != 0)" doesn't work either. > >>Also "if (!key($array))" is probably different from what you expect. > >>And of course "isset(key($array))" doens't work either. > >> > >>Best regards, > >> Marcus > >> > >>-- > >>PHP Internals - PHP Runtime Development Mailing List > >>To unsubscribe, visit: http://www.php.net/unsub.php > > > > > Best regards, > Marcus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > ------=_Part_14709_16096733.1149419875447--