Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54578 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68363 invoked from network); 14 Aug 2011 13:00:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2011 13:00:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; 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:44083] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/32-50938-8F6C74E4 for ; Sun, 14 Aug 2011 09:00:50 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 7A9E8DE142; Sun, 14 Aug 2011 14:00:00 +0100 (BST) Date: Sun, 14 Aug 2011 14:00:00 +0100 (BST) X-X-Sender: derick@whisky To: Ferenc Kovacs cc: Laruence , PHP Internals In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-545147301-1313326800=:4043" Subject: Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter From: derick@php.net (Derick Rethans) --8323328-545147301-1313326800=:4043 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 14 Aug 2011, Ferenc Kovacs wrote: > On Sun, Aug 14, 2011 at 1:24 PM, Derick Rethans wrote: > > On Sat, 13 Aug 2011, Laruence wrote: > > > >> Dear all: > >> =C2=A0 =C2=A0 I am going to close strn(case)cmp supporting negative le= ngth vote, > >> since it has been calling for vote near two weeks, and no new feedback > >> . > >> > >> =C2=A0 =C2=A0 the Voting result is: > >> =C2=A0 =C2=A0 =C2=A0Support : =C2=A06 =C2=A0felipe pajoye pierrick gwy= nne tyrael laruence > >> =C2=A0 =C2=A0 =C2=A0Decline : =C2=A03 =C2=A0iliaa rasmus salathe > >> > >> =C2=A0 =C2=A0 it wins 2/3 vote, =C2=A0 so I think this supposed to mea= n that accept, =C2=A0right? > > > > I voted against too. Also, you started the vote with not even a week > > between RFC announcement and call for voting, so I guess that makes thi= s > > invalid? > > > > > > Just looked over the RFC, and this whole example is weird: > > > > > var_dump(strncmp("prefix_num", "num", -10)); > > ?> > > > > Why does it even find the substring as you can't do "-10" from the end? > > If the number is too high, it should give you a warning. >=20 > imo the patch is consistent with how substr works: > tyrael@thor:~$ php -d display_errors=3D1 -d error_reporting=3D-1 -r 'echo > substr("prefix_num", -100);' > prefix_num Maybe, but I would classify *that* as a bug as it makes no sense at all. Derick --=20 http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug --8323328-545147301-1313326800=:4043--