Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49781 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93107 invoked from network); 23 Sep 2010 08:06:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2010 08:06:03 -0000 Authentication-Results: pb1.pair.com header.from=petercowburn@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=petercowburn@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: petercowburn@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:48697] helo=mail-iw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/84-63309-A6A0B9C4 for ; Thu, 23 Sep 2010 04:06:02 -0400 Received: by iwn37 with SMTP id 37so1489154iwn.29 for ; Thu, 23 Sep 2010 01:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=e91KTq7QSq5TkPToEa2IWSq8DqnZIqCc3NgdvDZM8KU=; b=e0fnVIJl4iDBq0KfzYntYY/fJTXHjupiHNYZWUNkNo4m8UDw22PXDvTYbU4GSehNJ6 xjHuSjWCii/2gq0EhVe0aju8rqJWy8glkqsS7RtA41O4V6ABI69ZqzE4gijsMgCrlHUr As2DDtH7X3Iu4V/ZQIvnZaFQQbcyGJac/lxzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=pCQsjaBLiCYeLrPhC6LHa+C1bETDI6u7MBkGAUfkHUtwYzjr4CLus6HspPxnlvMpVR SEo2kq5QOxOIsWcPdwCstvbpBYLRhVJjL+plZcE61X3sEcaaSD+otrjTS0WMVGSrPkGP MS9N6/ytCMhXluRuTKmyvpOS1fscJIx0aOchM= MIME-Version: 1.0 Received: by 10.231.10.135 with SMTP id p7mr1281017ibp.88.1285229159800; Thu, 23 Sep 2010 01:05:59 -0700 (PDT) Received: by 10.231.161.83 with HTTP; Thu, 23 Sep 2010 01:05:59 -0700 (PDT) In-Reply-To: <9CE5BB6D-2BBC-4171-AF43-01A27EBDE1EF@roshambo.org> References: <9CE5BB6D-2BBC-4171-AF43-01A27EBDE1EF@roshambo.org> Date: Thu, 23 Sep 2010 09:05:59 +0100 Message-ID: To: Philip Olson Cc: Internals Internals , Andi Gutmans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] deprecation status of $str{42} versus $str[42], revisited From: petercowburn@gmail.com (Peter Cowburn) On 22 September 2010 22:34, Philip Olson wrote: > Greetings geeks, > > This topic still lacks a defined conclusion. There are several rumors tha= t something was decided, but I can't confirm this without archived proof. H= ere's the code: > > =A0$str =3D "I am an array of characters, but still a string."; > > =A0echo $str[3]; // Documented as correct since 2006 > =A0echo $str{3}; // Documented as deprecated since 2006, but still no E_D= EPRECATED error > > We discussed this uninteresting topic back in 2008 here, which includes t= he timeline: > > =A0- http://php.markmail.org/thread/nm7n57ns23mwoshw > > There was no conclusion, and the thread went off topic. So because code s= peaks louder than words, the following will happen if this does not receive= an alternative conclusion here: > > =A0- Both will be considered fine, where neither is deprecated. Both will= be documented as proper. For no real, technical, reason, (just what my gut wants, and I tend to listen to it) I would prefer both to continue being equal* without any deprecation (E_DEPRECATED or just word-of-mouth). * They're not always interchangeable: this may be sliding off-topic (so feel free not to address it in this thread) but I'd quite like the curly-brace syntax to be available for the function array dereferencing which was added to trunk if only to keep things consistent. > > One opinion is it should remain deprecated but without an E_DEPRECATED er= ror, but I'm unsure how that makes sense. To me that says it's not deprecat= ed, but rather, is discouraged (but still for unknown reasons). Anyway, tho= ughts? > > Also, Andi mentioned[1] the possibility of optimizing {} for string use (= the original intent) in which case keeping {} would be wise. > > [1] http://markmail.org/message/qisqdheeyoccfydh > [2] Related bug: http://bugs.php.net/52254 > > Regards, > Philip > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >