From e225b716c597047f6ba70efc0189bf26d55934f1 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Thu, 4 May 2006 02:21:28 +0000 Subject: [PATCH] $str{42} isn't deprecated (yet?), but $str[42] is preferred. We'll mention that. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@212400 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/language/types.xml b/language/types.xml index 30f59d499e..263cd222b7 100644 --- a/language/types.xml +++ b/language/types.xml @@ -1,5 +1,5 @@ - + Types @@ -1089,9 +1089,8 @@ echo "I'd like to have another {${ strrev('reeb') }}, hips"; - For backwards compatibility, you may still use braces like - $str{42} for the same purpose. However, this syntax - is deprecated as of PHP 6. + They may also be accessed using braces like $str{42} + for the same purpose. However, using square array-brackets is preferred. @@ -1115,7 +1114,7 @@ $last = $str[strlen($str)-1]; $str = 'Look at the sea'; $str[strlen($str)-1] = 'e'; -// Deprecated syntax with braces +// Alternative method using {} $third = $str{2}; ?>