Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38153 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36613 invoked from network); 10 Jun 2008 22:27:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2008 22:27:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=philip@roshambo.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=philip@roshambo.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain roshambo.org from 207.210.105.50 cause and error) X-PHP-List-Original-Sender: philip@roshambo.org X-Host-Fingerprint: 207.210.105.50 analucia.asmallorange.com Received: from [207.210.105.50] ([207.210.105.50:50277] helo=analucia.asmallorange.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/81-26183-EBFFE484 for ; Tue, 10 Jun 2008 18:27:10 -0400 Received: from c-67-183-231-13.hsd1.wa.comcast.net ([67.183.231.13]:58783 helo=[192.168.0.135]) by analucia.asmallorange.com with esmtpa (Exim 4.69) (envelope-from ) id 1K6CJ1-00076f-Bp for internals@lists.php.net; Tue, 10 Jun 2008 18:27:07 -0400 Message-ID: <77972256-ED0C-4FCE-8DEF-8283FE1BBFC5@roshambo.org> To: PHP Developers Mailing List Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Date: Tue, 10 Jun 2008 15:27:02 -0700 X-Mailer: Apple Mail (2.924) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - analucia.asmallorange.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roshambo.org X-Source: X-Source-Args: X-Source-Dir: Subject: deprecation status of $str{42} versus $str[42] From: philip@roshambo.org (Philip Olson) 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