Re: String indexing with braces
| From: | php3 at developersdesk dot com | Date: | Thu, 08 Mar 2001 01:01:20 +0000 |
| Subject: | Re: String indexing with braces | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42979@lists.php.net to get a copy of this message | ||
Addressed to: Toby Butzon <php-lists@imawebdesigner.com>
php-general@lists.php.net
** Reply to note from Toby Butzon <php-lists@imawebdesigner.com> Wed, 07 Mar 2001 18:07:29
-0500
>
> Greetings,
>
> I know there's been some discussion of adding support for string
> indexing (that would be exclusive to strings [because it wouldn't apply
> to arrays] and therefore more efficient) using curly braces
> ($someStr{0}, $someStr{1}, etc.).
>
> Has this been implemented, and, if so, in what version did this first
> appear?
Yes. I am using 4.0.2 and it is supported. I am not sure how long it
has been available. Currently $SomeStr[0] and $SomeStr{0} are the same
thing, but someday the [] notation will go away. Maybe php 5.
Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com