Document constant arrays in the migration guide.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@335317 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Adam Harvey 2014-12-20 02:14:41 +00:00
parent 7506ffce44
commit 5ac4f93fd0

View file

@ -5,7 +5,7 @@
<title>New features</title>
<sect2 xml:id="migration56.new-features.const-scalar-exprs">
<title>Constant scalar expressions</title>
<title>Constant expressions</title>
<para>
It is now possible to provide a scalar expression involving numeric and
@ -41,6 +41,29 @@ echo C::SENTENCE;
<![CDATA[
4
The value of THREE is 3
]]>
</screen>
</informalexample>
<para>
It is also now possible to define a constant <type>array</type> using the
<literal>const</literal> keyword:
</para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
const ARR = ['a', 'b'];
echo ARR[0];
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
a
]]>
</screen>
</informalexample>