Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47378 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79457 invoked from network); 17 Mar 2010 18:36:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2010 18:36:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=felix.devliegher@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=felix.devliegher@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.78.26 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felix.devliegher@gmail.com X-Host-Fingerprint: 74.125.78.26 ey-out-2122.google.com Received: from [74.125.78.26] ([74.125.78.26:25228] helo=ey-out-2122.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/F0-07776-42121AB4 for ; Wed, 17 Mar 2010 13:36:20 -0500 Received: by ey-out-2122.google.com with SMTP id d26so12114eyd.39 for ; Wed, 17 Mar 2010 11:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=Ovi/bm9FlH/OmbdlyHg6Jwr9bKZOZZ8sY21quFIC/0c=; b=dJYy+4Erh5lnypVuFZDM6543cDnYgYCzDFJX8xeFL8FJVkJMrYm1/YXVi9Q7Mf8Mtz hmzdHTWk1uUWX0eJxEHBvZfYk/7wR+4nLLC/vRELDdyXQ02z/D8Vdn5KQl8D4Fc2uYPC zXPdZKtNeZo6bwLzTjxcML7fzCfVK+CSOxU8A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=SgRM7ygSMMYZZjrP7GehxLaFK/eObeNyh3D/4dfewAdY8qWEBkfghtY6q7SW8ADgzS 4NG4RiI/KXN+U+A2GP/eP29LZZXXJ65n5HaqHyXgWf/kVeG+qzov8xE7Gf69OUd2/cfQ fc2G4kWcNIKfpv9SpBSGWXLtJ29FX8ZJLtwoU= Received: by 10.213.111.12 with SMTP id q12mr67622ebp.50.1268850977640; Wed, 17 Mar 2010 11:36:17 -0700 (PDT) Received: from [192.168.2.10] (94-225-45-193.access.telenet.be [94.225.45.193]) by mx.google.com with ESMTPS id 13sm4273788ewy.5.2010.03.17.11.36.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Mar 2010 11:36:16 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Wed, 17 Mar 2010 19:36:14 +0100 Cc: Frederic Hardy , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <23E13BAA-52BB-4BED-BC6B-03FA9400AFFE@gmail.com> References: <6E76B52E-7543-4F09-A948-A7910513B548@gmail.com> <4BA102F2.1000405@mageekbox.net> <62279C8B-4E50-47DE-B682-EE8152084433@gmail.com> To: Derick Rethans X-Mailer: Apple Mail (2.1077) Subject: Re: [PHP-DEV] array_seek function From: felix.devliegher@gmail.com (Felix De Vliegher) On 17-mrt-2010, at 19:09, Derick Rethans wrote: > On Wed, 17 Mar 2010, Felix De Vliegher wrote: >=20 >> On 17-mrt-2010, at 17:52, Derick Rethans wrote: >>=20 >>> On Wed, 17 Mar 2010, Felix De Vliegher wrote: >>>=20 >>>> On 17-mrt-2010, at 17:27, Frederic Hardy wrote: >>>>>=20 >>>>> Why not use arrayIterator::seek() ? >>>>=20 >>>> Because the functionality isn't exactly the same.=20 >>>> ArrayIterator::seek() only sets the array pointer, array_seek would=20= >>>> also return the value + have fseek()-like functionality with the=20 >>>> SEEK_* consts and optional negative offsets. >>>=20 >>> To be honest, I'd rather have the proposed array_seek() return a = status=20 >>> whether the seek worked or not. Notices are uncool and you can = already=20 >>> retrieve data/key with key() and current().=20 >>>=20 >>=20 >> Update: http://phpbenelux.eu/array_seek-return.patch.txt >> I've kept the fseek()-style return values (0 when fine, -1 when seek = fails) >=20 > Any reason why you picked that over the (IMO more logical) true/false=20= > approach? No, just to keep it similar to fseek(). Either way works for me. Felix=