Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23810 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86545 invoked by uid 1010); 31 May 2006 03:28:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86530 invoked from network); 31 May 2006 03:28:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2006 03:28:56 -0000 X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:7044] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id EC/89-07504-77D0D744 for ; Tue, 30 May 2006 23:28:56 -0400 Received: (qmail 4389 invoked from network); 31 May 2006 03:28:32 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 31 May 2006 03:28:32 -0000 Message-ID: <7.0.1.0.2.20060530202530.03871ca8@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Tue, 30 May 2006 20:28:47 -0700 To: Marcus Boerger , "Matthew C. Kavanagh" Cc: internals@lists.php.net In-Reply-To: <1421594360.20060527235241@marcus-boerger.de> References: <18210000279.20060527232743@marcus-boerger.de> <4478C650.7000403@teh.ath.cx> <1421594360.20060527235241@marcus-boerger.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] RFC array functions From: andi@zend.com (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 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()? 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