Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54580 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76667 invoked from network); 14 Aug 2011 13:43:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2011 13:43:30 -0000 Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:52935] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 64/F3-50938-001D74E4 for ; Sun, 14 Aug 2011 09:43:29 -0400 Received: by vwl1 with SMTP id 1so3886829vwl.29 for ; Sun, 14 Aug 2011 06:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pO0/5Q5mFQZFdsYZaAR9gJcbvg0wBULtK8xxI53Q30I=; b=rcBki7VT6kpiFdar16Dde5Qc/MluZWNLvJEVRCwLhb0CKmf6TaibEomsig3AOfpkIg VXR984vQ3UNG1tgMTDogYxA+Q7tpsw9G6j0ng/7YkFnF4TUQYlWd2BYGw0sdtTUAtrf2 Ops8qRF61eV6uc04NfreONZsXn/RpxMLrZNuM= MIME-Version: 1.0 Received: by 10.52.176.166 with SMTP id cj6mr2911119vdc.155.1313329405968; Sun, 14 Aug 2011 06:43:25 -0700 (PDT) Sender: laruence@gmail.com Received: by 10.220.184.76 with HTTP; Sun, 14 Aug 2011 06:43:25 -0700 (PDT) In-Reply-To: References: Date: Sun, 14 Aug 2011 21:43:25 +0800 X-Google-Sender-Auth: 18jC5A8g8GiLOQWktC54SrTSjvE Message-ID: To: Derick Rethans Cc: Ferenc Kovacs , 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: laruence@php.net (Laruence) Hi: this just to say that stncasecmp has the same behavior of either negative or postive length argument. why you insist to this point? as strncmp("aaaa", "bbb", 1000000) works with no warning, why negative length need trigger warnings? thanks 2011/8/14 Derick Rethans : > 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 l= ength vote, >> >> since it has been calling for vote near two weeks, and no new feedbac= k >> >> . >> >> >> >> =C2=A0 =C2=A0 the Voting result is: >> >> =C2=A0 =C2=A0 =C2=A0Support : =C2=A06 =C2=A0felipe pajoye pierrick gw= ynne 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 me= an 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 th= is >> > 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 'ech= o >> substr("prefix_num", -100);' >> prefix_num > > Maybe, but I would classify *that* as a bug as it makes no sense at all. > > Derick > > -- > http://derickrethans.nl | http://xdebug.org > Like Xdebug? Consider a donation: http://xdebug.org/donate.php > twitter: @derickr and @xdebug --=20 Laruence =C2=A0Xinchen Hui http://www.laruence.com/