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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php