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:
Christoph Michael Becker 2016-08-09 11:32:38 +00:00
parent 5d2c855eac
commit 6937b29491

View file

@ -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">