Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49088 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40971 invoked from network); 16 Jul 2010 08:07:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2010 08:07:27 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.185 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.185 il-mr1.zend.com Received: from [212.25.124.185] ([212.25.124.185:47926] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/B4-12736-D33104C4 for ; Fri, 16 Jul 2010 04:07:27 -0400 Received: from il-gw1.zend.com (unknown [10.1.1.22]) by il-mr1.zend.com (Postfix) with ESMTP id 0F08850468; Fri, 16 Jul 2010 10:41:33 +0300 (IDT) Received: from tpl.home (10.1.10.4) by il-ex2.zend.net (10.1.1.22) with Microsoft SMTP Server id 14.0.689.0; Fri, 16 Jul 2010 11:06:40 +0300 Message-ID: <4C401337.2070602@zend.com> Date: Fri, 16 Jul 2010 12:07:19 +0400 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5 MIME-Version: 1.0 To: Stas Malyshev CC: PHP Internals References: <4C3ED076.5060605@zend.com> <4C400E96.7080207@sugarcrm.com> In-Reply-To: <4C400E96.7080207@sugarcrm.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] string_offset access optimization From: dmitry@zend.com (Dmitry Stogov) Hi Stas, On 07/16/2010 11:47 AM, Stas Malyshev wrote: > Hi! > >> $str = "abs"; >> var_dumo($str[1][0]); >> >> I think it's not a problem at all. >> "b" makes sense because "abs"[1] -> "b" and "b"[0] -> "b". > > Totally makes sense, but it'd be a bit strange that $str[1][0] works but > $str[1][0] = "a" does not. $str[1][0] = "a"; doesn't have to modify $str. var_dump($str[1][1]) will return empty string $str[1][1] = "a"; can't modify $str at all. So I think it is not a problem. Thanks. Dmitry.