Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38158 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81014 invoked from network); 11 Jun 2008 04:12:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jun 2008 04:12:03 -0000 Authentication-Results: pb1.pair.com header.from=andi@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:2644] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/47-26183-1905F484 for ; Wed, 11 Jun 2008 00:12:03 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 11 Jun 2008 07:12:03 +0300 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 10 Jun 2008 21:11:59 -0700 Message-ID: <698DE66518E7CA45812BD18E807866CE01AB3D1D@us-ex1.zend.net> In-Reply-To: <1213139582.12765.5.camel@localhost> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] deprecation status of $str{42} versus $str[42] Thread-Index: AcjLT6avrZepf3sfQtqx40rYEZRxFgAKQFpw References: <77972256-ED0C-4FCE-8DEF-8283FE1BBFC5@roshambo.org> <484F0897.4040405@fischer.name> <1213139582.12765.5.camel@localhost> To: "Lars Strojny" , "Markus Fischer" Cc: "PHP Developers Mailing List" X-OriginalArrivalTime: 11 Jun 2008 04:12:03.0410 (UTC) FILETIME=[4DA37B20:01C8CB79] Subject: RE: [PHP-DEV] deprecation status of $str{42} versus $str[42] From: andi@zend.com ("Andi Gutmans") Hi, $str{} was considered a best practice for a while so as you can see via Google Code Search it's been used quite a bit. I take the blame for introducing it with the intention to not only create a better separation between arrays and string offsets but by also then allowing for a cleaner implementation for string offsets. Unfortunately I never delivered that cleaner implementation esp. as there didn't seem a huge benefit I don't have strong feelings either way esp. as moving from $str{} to $str[] is scriptable but given that so many people have used it and there are benefits to separating the two (it also resolves an ambiguity) I'd like to put another option out there which is to try and see if we can actually follow through on original intentions of also delivering technical benefit in addition to the syntax separation. Andi