From 0ff6b37031ab75e7c7c59819689338e317df8361 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 2 Oct 2000 09:37:53 +0000 Subject: [PATCH] Insert warning about constant class initializers git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@33257 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/language/oop.xml b/language/oop.xml index 8933d5da34..9caba7a513 100644 --- a/language/oop.xml +++ b/language/oop.xml @@ -40,6 +40,10 @@ class Cart { array of articles in the cart and two functions to add and remove items from this cart. + + In PHP 4, only constant initializers for var + variables are allowed. Use constructors for non-constant initializers. + Classes are types, that is, they are blueprints for actual variables. You have to create a variable of the desired type with