Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47968 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59360 invoked from network); 15 Apr 2010 11:08:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Apr 2010 11:08:54 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:58668] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/9C-20494-5C3F6CB4 for ; Thu, 15 Apr 2010 07:08:53 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 52636E202A; Thu, 15 Apr 2010 11:08:50 +0000 (UTC) Date: Thu, 15 Apr 2010 12:08:50 +0100 (BST) X-X-Sender: derick@kossu.derickrethans.nl To: Felix De Vliegher cc: PHP internals , =?UTF-8?Q?Johannes_Schl=C3=BCter?= In-Reply-To: Message-ID: References: <6E76B52E-7543-4F09-A948-A7910513B548@gmail.com> <4BA102F2.1000405@mageekbox.net> <62279C8B-4E50-47DE-B682-EE8152084433@gmail.com> <4C492F0D-E503-433A-BE21-E1A42777E4B0@gmail.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] array_seek function From: derick@php.net (Derick Rethans) On Tue, 13 Apr 2010, Felix De Vliegher wrote: > >>>> Update: http://phpbenelux.eu/array_seek-return.patch.txt > >>>> I've kept the fseek()-style return values (0 when fine, -1 when seek fails) > >>> > >>> Any reason why you picked that over the (IMO more logical) true/false > >>> approach? > >> > >> No, it makes more sense to use the boolean return values, I was just > >> using your fseek() analogy. Although I still find it useful to return > >> the seeked value, and false when seek fails (basically how next(), > >> reset() and friends behave). > > > > Has this been added to trunk now? Or not yet? > > No, still have it lying around. Can I commit this? Dunno... did you go with true/false in the end, or returning the value? I just realize that in the latter case you wouldn't be able to see whether the seek actually worked, because every value could be a "correct" value. I'd prefer the true/false thing still because of that. Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug