mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
0b89623f80
commit
08f5e816ad
1 changed files with 3 additions and 2 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue