Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54588 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14094 invoked from network); 14 Aug 2011 18:21:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2011 18:21:17 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.183 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.183 smtp183.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.183] ([67.192.241.183:39067] helo=smtp183.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/81-05730-C12184E4 for ; Sun, 14 Aug 2011 14:21:16 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp8.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id F0B2F811B; Sun, 14 Aug 2011 14:21:13 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp8.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id AA63180C6; Sun, 14 Aug 2011 14:21:13 -0400 (EDT) Message-ID: <4E48121A.3090007@sugarcrm.com> Date: Sun, 14 Aug 2011 11:21:14 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Derick Rethans CC: PHP Internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! >> imo the patch is consistent with how substr works: >> tyrael@thor:~$ php -d display_errors=1 -d error_reporting=-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. It makes some sense, if you take the meaning of argument as "at most 100 characters". I'm not sure how useful it'd be backwards, but forward something like "at most 100 chars" is very useful and warning, on the contrary, in such situation would be useless and annoying. Why not make backwards case symmetrical? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227