Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23874 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96213 invoked by uid 1010); 3 Jun 2006 10:35:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 96198 invoked from network); 3 Jun 2006 10:35:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jun 2006 10:35:48 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:58783] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 05/75-22639-20661844 for ; Sat, 03 Jun 2006 06:35:46 -0400 Received: from baumbart.mbo (dslb-084-063-043-079.pools.arcor-ip.net [84.63.43.79]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 8F8A735C1E8; Sat, 3 Jun 2006 12:35:42 +0200 (CEST) Date: Sat, 3 Jun 2006 12:38:01 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <462553891.20060603123801@marcus-boerger.de> To: Andi Gutmans Cc: "Matthew C. Kavanagh" , internals@lists.php.net In-Reply-To: <7.0.1.0.2.20060530202530.03871ca8@zend.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC array functions From: helly@php.net (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. > 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