Add try/catch to list of places where const keyword cannot be used.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@333547 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Chris Wright 2014-05-16 15:13:31 +00:00
parent 0b89623f80
commit 08f5e816ad

View file

@ -173,8 +173,9 @@ echo CONSTANT;
As opposed to defining constants using <function>define</function>,
constants defined using the <literal>const</literal> keyword must be
declared at the top-level scope because they are defined at compile-time.
This means that they cannot be declared inside functions, loops or
<literal>if</literal> statements.
This means that they cannot be declared inside functions, loops,
<literal>if</literal> statements or <literal>try</literal>/
<literal>catch</literal> blocks.
</para>
</note>