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