svn: /phpdoc/en/trunk/language/types/ array.xml
| From: | Sherif Ramadan | Date: | Wed, 14 Nov 2012 17:08:15 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/types/ array.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-10717@lists.php.net to get a copy of this message | ||
googleguy Wed, 14 Nov 2012 17:08:15 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=328358
Log:
Added note for accessing array elements with curly braces - fixes bug #55324
Bug: https://bugs.php.net/55324 (Open) No documentation for
accessing array elements with curly braces
Changed paths:
U phpdoc/en/trunk/language/types/array.xml
Modified: phpdoc/en/trunk/language/types/array.xml
===================================================================
--- phpdoc/en/trunk/language/types/array.xml 2012-11-14 14:55:56 UTC (rev 328357)
+++ phpdoc/en/trunk/language/types/array.xml 2012-11-14 17:08:15 UTC (rev 328358)
@@ -304,6 +304,12 @@
</example>
<para>
+ <note>
+ Both square brackets and curly braces can be used interchangeably for accessing array elements
(e.g. $array[42] and $array{42} will both do the same thing in the example above).
+ </note>
+ </para>
+
+ <para>
As of PHP 5.4 it is possible to array dereference the result of a function or method
call directly. Before it was only possible using a temporary variable.
</para>