Added note for accessing array elements with curly braces - fixes bug #55324

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328358 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sherif Ramadan 2012-11-14 17:08:15 +00:00
parent 393c8182a0
commit bf9085b2b1

View file

@ -303,6 +303,12 @@ string(3) "foo"
</screen>
</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.