Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54576 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66662 invoked from network); 14 Aug 2011 12:56:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2011 12:56:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:40678] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/E1-50938-9F5C74E4 for ; Sun, 14 Aug 2011 08:56:26 -0400 Received: by gyd5 with SMTP id 5so3164295gyd.29 for ; Sun, 14 Aug 2011 05:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=/KgCsIsbL5s0owPDgTwlcJ3LkH/qw11ZWonqJexIzQ8=; b=naeEEPuFxQWvxMzl0i1RynQmIvufCBqtZDaRZ9Dz+Rt8emSUtVFHVz36W0pKxYjdk8 0TJPjhmK4cFfFYpmOySw6J+MLJRdEG59X8/DnwLs3sCrNyNBrWXxNAPxVijnru0Cj07b ku0o7l5xCFtxrzjKJgum5T91Gv5Rg2eP0fz8M= MIME-Version: 1.0 Received: by 10.151.21.9 with SMTP id y9mr3378611ybi.344.1313326583128; Sun, 14 Aug 2011 05:56:23 -0700 (PDT) Received: by 10.146.168.9 with HTTP; Sun, 14 Aug 2011 05:56:23 -0700 (PDT) In-Reply-To: References: Date: Sun, 14 Aug 2011 14:56:23 +0200 Message-ID: To: Derick Rethans Cc: Laruence , PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter From: tyra3l@gmail.com (Ferenc Kovacs) 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 leng= th 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 gwynn= e 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 mean = 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 this > 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. 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 --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu