Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54625 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21122 invoked from network); 15 Aug 2011 09:50:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2011 09:50:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=lists@rotorised.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lists@rotorised.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain rotorised.com from 203.88.115.241 cause and error) X-PHP-List-Original-Sender: lists@rotorised.com X-Host-Fingerprint: 203.88.115.241 ironport1-mx.cbr1.mail-filtering.com.au Received: from [203.88.115.241] ([203.88.115.241:55954] helo=ironport1-mx.cbr1.mail-filtering.com.au) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/C4-31518-EDBE84E4 for ; Mon, 15 Aug 2011 05:50:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhwHAIPrSE6va78L/2dsb2JhbABAhEiUMpABgUABAQUjVRELGAICBRYLAgIJAwIBAgFFEwgBAResBJBlgSyEC4EQBJgei3s X-IronPort-AV: E=Sophos;i="4.67,373,1309701600"; d="scan'208";a="465991097" Received: from ju001lcs02.dfw.the-server.net.au (HELO ju001lcs02.dfw.the-server.com.au) ([175.107.191.11]) by ironport1-mta.cbr1.mail-filtering.com.au with ESMTP; 15 Aug 2011 19:50:18 +1000 Received: from [121.208.5.54] (helo=[192.168.0.2]) by ju001lcs02.dfw.the-server.com.au with esmtpa (Exim 4.69) (envelope-from ) id 1QstoF-001Fw3-MC for internals@lists.php.net; Mon, 15 Aug 2011 19:50:17 +1000 Message-ID: <4E48EBE3.2030206@rotorised.com> Date: Mon, 15 Aug 2011 19:50:27 +1000 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: internals@lists.php.net References: <4E48121A.3090007@sugarcrm.com> <4E48134E.4030708@sugarcrm.com> <4E481695.6040900@php.net> <4E483804.7070009@sugarcrm.com> <4E484037.2080107@php.net> <4E4843B0.70605@php.net> <4E48A081.2080300@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter From: lists@rotorised.com (Ryan McCue) Laruence wrote: > I think we are not talking about how to accomplish a function, we > are talking about how to do it better > > and, in fact, I think strrev is need more cpu time and alloc space, > although they are very tiny :) I very much doubt it's ever going to be a bottleneck (and I think the same about strncmp vs. substr; no real need to avoid a temp variable). I could see this patch being useful, but personally, I think the substr solution is a better one, since it doesn't risk breaking BC, as Rasmus noted. -- Ryan McCue