Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13633 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57000 invoked by uid 1010); 30 Oct 2004 15:45:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56975 invoked from network); 30 Oct 2004 15:45:27 -0000 Received: from unknown (HELO prohost.org) (216.126.86.27) by pb1.pair.com with SMTP; 30 Oct 2004 15:45:27 -0000 Received: (qmail 26115 invoked from network); 30 Oct 2004 15:45:26 -0000 Received: from cpe0050bad46dce-cm000f9f7d6664.cpe.net.cable.rogers.com (HELO ?192.168.1.101?) (@69.196.31.138) by prohost.org with SMTP; 30 Oct 2004 15:45:26 -0000 Message-ID: <4183B715.3060209@prohost.org> Date: Sat, 30 Oct 2004 11:45:25 -0400 User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrey Hristov CC: internals@lists.php.net References: <418294D9.4070700@prohost.org> <20041029193421.9557.qmail@pb1.pair.com> <41832D13.7010308@prohost.org> <41835A8E.4030007@hristov.com> In-Reply-To: <41835A8E.4030007@hristov.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Negative string offset support From: ilia@prohost.org (Ilia Alshanetsky) Andrey Hristov wrote: > Andy mentioned that he tried in the past to separate {} and [] but after > some unsuccess he left the idea of separating. So, the patch definitely > won't be 2-3 lines of code. I am well aware that at this point PHP has no separation between [] and {} as far as string offsets go. My initial suggestion was to add the support for negative offsets and not to limit it to a particular construct. Given that this is intended for strings only, I readily agreed with people who suggested that it should be available only for {}, assuming there was a separation. > There are a lot of people which don't know about negative offsets at all, > and use strlen() for calculations. Moving this feature to the language > itself won't help them that much if just don't read the documentation ( > as they do). Almost any new function/construct/extension begins from obscurity. Even people who know about it won't use it till enough PHP versions have been released with it, because they'd up limit their apps to "latest and greatest". Ilia