Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49778 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37561 invoked from network); 22 Sep 2010 21:34:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2010 21:34:29 -0000 Authentication-Results: pb1.pair.com header.from=philip@roshambo.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=philip@roshambo.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain roshambo.org from 209.85.160.42 cause and error) X-PHP-List-Original-Sender: philip@roshambo.org X-Host-Fingerprint: 209.85.160.42 mail-pw0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:35207] helo=mail-pw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/A0-45302-3667A9C4 for ; Wed, 22 Sep 2010 17:34:28 -0400 Received: by pwi7 with SMTP id 7so108354pwi.29 for ; Wed, 22 Sep 2010 14:34:25 -0700 (PDT) Received: by 10.142.78.12 with SMTP id a12mr700542wfb.43.1285191265017; Wed, 22 Sep 2010 14:34:25 -0700 (PDT) Received: from [192.168.0.199] (c-76-104-185-25.hsd1.wa.comcast.net [76.104.185.25]) by mx.google.com with ESMTPS id c14sm16204wfe.2.2010.09.22.14.34.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Sep 2010 14:34:23 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Wed, 22 Sep 2010 14:34:03 -0700 Message-ID: <9CE5BB6D-2BBC-4171-AF43-01A27EBDE1EF@roshambo.org> Cc: Andi Gutmans To: Internals Internals Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) Subject: deprecation status of $str{42} versus $str[42], revisited From: philip@roshambo.org (Philip Olson) Greetings geeks, This topic still lacks a defined conclusion. There are several rumors = that something was decided, but I can't confirm this without archived = proof. Here's the code: $str =3D "I am an array of characters, but still a string."; echo $str[3]; // Documented as correct since 2006 echo $str{3}; // Documented as deprecated since 2006, but still no = E_DEPRECATED error We discussed this uninteresting topic back in 2008 here, which includes = the timeline: - http://php.markmail.org/thread/nm7n57ns23mwoshw There was no conclusion, and the thread went off topic. So because code = speaks louder than words, the following will happen if this does not = receive an alternative conclusion here: - Both will be considered fine, where neither is deprecated. Both will = be documented as proper. One opinion is it should remain deprecated but without an E_DEPRECATED = error, but I'm unsure how that makes sense. To me that says it's not = deprecated, but rather, is discouraged (but still for unknown reasons). = Anyway, thoughts? Also, Andi mentioned[1] the possibility of optimizing {} for string use = (the original intent) in which case keeping {} would be wise.=20 [1] http://markmail.org/message/qisqdheeyoccfydh [2] Related bug: http://bugs.php.net/52254 Regards, Philip