mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Class constants are allocated once per class
We try to get rid of the myth that class constants were allocated for each instance, as claimed by user note 112286. Proof: <https://3v4l.org/3DKMC>. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339824 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
5d2c855eac
commit
6937b29491
1 changed files with 4 additions and 0 deletions
|
@ -22,6 +22,10 @@
|
|||
The variable's value can not be a keyword (e.g. <literal>self</literal>,
|
||||
<literal>parent</literal> and <literal>static</literal>).
|
||||
</para>
|
||||
<para>
|
||||
Note that class constants are allocated once per class, and not for each
|
||||
class instance.
|
||||
</para>
|
||||
<example>
|
||||
<title>Defining and using a constant</title>
|
||||
<programlisting role="php">
|
||||
|
|
Loading…
Reference in a new issue