Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38156 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43934 invoked from network); 10 Jun 2008 23:15:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2008 23:15:42 -0000 Authentication-Results: pb1.pair.com header.from=jani.taskinen@sci.fi; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jani.taskinen@sci.fi; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sci.fi from 63.208.196.178 cause and error) X-PHP-List-Original-Sender: jani.taskinen@sci.fi X-Host-Fingerprint: 63.208.196.178 mho-01-bos.mailhop.org Received: from [63.208.196.178] ([63.208.196.178:55790] helo=mho-01-bos.mailhop.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/82-26183-D1B0F484 for ; Tue, 10 Jun 2008 19:15:41 -0400 Received: from cs78255253.pp.htv.fi ([62.78.255.253] helo=[127.0.0.1]) by mho-01-bos.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1K6D3y-000ME2-E3; Tue, 10 Jun 2008 23:15:38 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 62.78.255.253 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/PlV/+Se1kzrsQgzx4WTDDARNlEGRmWTU= Message-ID: <484F0B1C.30003@sci.fi> Date: Wed, 11 Jun 2008 02:15:40 +0300 Reply-To: jani.taskinen@iki.fi User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Markus Fischer CC: PHP Developers Mailing List References: <77972256-ED0C-4FCE-8DEF-8283FE1BBFC5@roshambo.org> <484F0897.4040405@fischer.name> In-Reply-To: <484F0897.4040405@fischer.name> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] deprecation status of $str{42} versus $str[42] From: jani.taskinen@sci.fi (Jani Taskinen) Correct me if I'm wrong but wasn't that the last decision we made about it the last time this was brought up? Just undocument it. Totally. It exists, only works with strings (right?! :) and is not recommended. So simply make it disappear from the docs. "See no evil, hear no evil, speak no evil.." ;) --Jani Markus Fischer kirjoitti: > Hi, > > I don't get this deprecation and thus the forced code change at all. > Considering the amount of code using this style, see > http://www.google.com/codesearch?as_q=\%24[a-z][a-z0-9_]*{[^}]%2B}&hl=en&as_lang=php > > and given that no PHP code change has been done I would rather suggest > removing the chase for deprecation in this case and remove this from the > documentation and let the syntax exist that way as long as PHP lives. > > - Markus > > > Philip Olson wrote: >> Hello geeks, >> >> This email is to confirm that $str{42} is deprecated in favour of >> $str[42] as of PHP 6. There is some confusion so let's make something >> official here. >> >> A little history: >> - May, 2001: $str[42]: is documented as deprecated since PHP 4 >> - Nov, 2005: $str[42]: kept while $str{42} is instead deprecated. >> Discussed: >> - http://markmail.org/message/tmvkpknlzfij5k5o >> - Nov, 2005: $str{42}: 5.1 RC5 throws E_STRICT for $str{42} but >> removed before release >> - May, 2006: $str[42]: switches from deprecated to "preferred" in docs >> - Aug, 2006: $str{42}: documentation reads "deprecated as of PHP 6" >> >> Currently it emits no errors when one plan was to deprecate it in PHP >> 5.x and remove in PHP 6.0 but that doesn't appear the plan today. >> >> So unless this thread changes something, an E_DEPRECATED will be added >> to HEAD (PHP 6.0.0) for curly brace string access ( $str{42} ) and the >> documentation will remain as is. >> >> Regards, >> Philip >> >> >