Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38210 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12769 invoked from network); 14 Jun 2008 13:54:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jun 2008 13:54:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=et@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=et@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 62.75.137.136 as permitted sender) X-PHP-List-Original-Sender: et@php.net X-Host-Fingerprint: 62.75.137.136 fuer-et.de Linux 2.5 (sometimes 2.4) (4) Received: from [62.75.137.136] ([62.75.137.136:53548] helo=eve.fuer-et.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/F0-06776-4ADC3584 for ; Sat, 14 Jun 2008 09:54:45 -0400 Received: from edea.local (p4FC857A1.dip.t-dialin.net [79.200.87.161]) by eve.fuer-et.de (Postfix) with ESMTP id 945C815E6A0; Sat, 14 Jun 2008 15:54:41 +0200 (CEST) To: internals@lists.php.net Date: Sat, 14 Jun 2008 15:55:28 +0200 User-Agent: KMail/1.9.9 Cc: Lukas Kahwe Smith , jani.taskinen@iki.fi, Markus Fischer References: <77972256-ED0C-4FCE-8DEF-8283FE1BBFC5@roshambo.org> <484F0B1C.30003@sci.fi> <4A532ACE-0EF1-4B52-892E-3E308AE8CCAF@pooteeweet.org> In-Reply-To: <4A532ACE-0EF1-4B52-892E-3E308AE8CCAF@pooteeweet.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200806141555.28792.et@php.net> Subject: Re: [PHP-DEV] deprecation status of $str{42} versus $str[42] From: et@php.net (Stefan Walk) On Saturday 14 June 2008 15:26:20 Lukas Kahwe Smith wrote: > On 11.06.2008, at 01:15, Jani Taskinen wrote: > > 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.." ;) > > I do not know the decision (anyone who cares about decisions being > remembered should write an RFC nowadays), but I think what Jani is > saying sounds reasonable to me. > > regards, > Lukas Kahwe Smith > mls@pooteeweet.org et@edea:~> php -r '$array = array("bar"); echo $array{0},"\n";' bar So, no "only works with strings". And it has been the preferred way to deal with string offsets for years. Undocumenting it will mean a feature that is used quite a bit because of this is not to be found in the documentation. Not really a good idea. Regards, Stefan