For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > May 2006 > cvs: phpdoc /en/language types.xml









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phpdoc /en/language types.xml
Philip Olson

2006-05-03, 9:58 pm

philip Thu May 4 02:21:29 2006 UTC

Modified files:
/phpdoc/en/language types.xml
Log:
$str{42} isn't deprecated (yet?), but $str[42] is preferred. We'll mention that.


http://cvs.php.net/viewcvs.cgi/phpd...6&diff_format=u
Index: phpdoc/en/language/types.xml
diff -u phpdoc/en/language/types.xml:1.165 phpdoc/en/language/types.xml:1.166
--- phpdoc/en/language/types.xml:1.165 Tue May 2 18:05:54 2006
+++ phpdoc/en/language/types.xml Thu May 4 02:21:28 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.165 $ -->
+<!-- $Revision: 1.166 $ -->
<chapter id="language.types">
<title>Types</title>

@@ -1089,9 +1089,8 @@
</para>
<note>
<simpara>
- For backwards compatibility, you may still use braces like
- <varname>$str{42}</varname> for the same purpose. However, this syntax
- is deprecated as of PHP 6.
+ They may also be accessed using braces like <varname>$str{42}</varname>
+ for the same purpose. However, using square array-brackets is preferred.
</simpara>
</note>
<para>
@@ -1115,7 +1114,7 @@
$str = 'Look at the sea';
$str[strlen($str)-1] = 'e';

-// Deprecated syntax with braces
+// Alternative method using {}
$third = $str{2};

?>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com