On 22/09/10 22:34, Philip Olson wrote:
Greetings geeks,
This topic still lacks a defined conclusion. There are several rumors that
something was decided, but I can't confirm this without archived proof. Here's
the code:
$str = "I am an array of characters, but still a string.";
echo $str[3]; // Documented as correct since 2006
echo $str{3}; // Documented as deprecated since 2006, but still no
E_DEPRECATED error
We discussed this uninteresting topic back in 2008 here, which includes the
timeline:
- http://php.markmail.org/thread/nm7n57ns23mwoshw
There was no conclusion, and the thread went off topic. So because code speaks
louder than words, the following will happen if this does not receive an
alternative conclusion here:
- Both will be considered fine, where neither is deprecated. Both will be
documented as proper.
One opinion is it should remain deprecated but without an E_DEPRECATED error,
but I'm unsure how that makes sense. To me that says it's not deprecated, but
rather, is discouraged (but still for unknown reasons). Anyway, thoughts?
Also, Andi mentioned[1] the possibility of optimizing {} for string use (the
original intent) in which case keeping {} would be wise.
[1] http://markmail.org/message/qisqdheeyoccfydh
[2] Related bug: http://bugs.php.net/52254
Regards,
Philip
You're right - it doesn't make sense.
My vote goes to leave it as-is.
--
Mark Skilbeck
mahcuz.com | gtk.php.net | pecl.php.net/cairo | docs.php.net
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php