Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23737 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45169 invoked by uid 1010); 28 May 2006 01:20:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45154 invoked from network); 28 May 2006 01:20:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2006 01:20:20 -0000 X-Host-Fingerprint: 217.79.190.163 r163.red.fastwebserver.de Received: from ([217.79.190.163:21782] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id F5/A7-17316-4DAF8744 for ; Sat, 27 May 2006 21:20:20 -0400 To: internals@lists.php.net,Marcus Boerger Date: Sun, 28 May 2006 03:20:15 +0200 Message-ID: <20060528032015.06fc5049@localhost.localdomain> In-Reply-To: <1421594360.20060527235241@marcus-boerger.de> References: <18210000279.20060527232743@marcus-boerger.de> <4478C650.7000403@teh.ath.cx> <1421594360.20060527235241@marcus-boerger.de> Reply-To: pierre.php@gmail.com X-Newsreader: Sylpheed-Claws 2.1.0 (GTK+ 2.8.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Posted-By: 217.79.190.163 Subject: Re: [PHP-DEV] RFC array functions From: pierre.php@gmail.com (Pierre) On Sat, 27 May 2006 23:52:41 +0200 helly@php.net (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. Ok, I got it now. The name is a bit confusing, array_valid has a different meaning that what it would do. array_key_valid is already better. However I still prefer to write: (key($arr) !== NULL) +0 here :) -- Pierre