mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Insert warning about constant class initializers
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@33257 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d34d225b86
commit
0ff6b37031
1 changed files with 4 additions and 0 deletions
|
@ -40,6 +40,10 @@ class Cart {
|
|||
array of articles in the cart and two functions to add and remove
|
||||
items from this cart.
|
||||
</para>
|
||||
<note><simpara>
|
||||
In PHP 4, only constant initializers for <literal>var</literal>
|
||||
variables are allowed. Use constructors for non-constant initializers.
|
||||
</simpara></note>
|
||||
<para>
|
||||
Classes are types, that is, they are blueprints for actual
|
||||
variables. You have to create a variable of the desired type with
|
||||
|
|
Loading…
Reference in a new issue