From 6a1e0898317594911254a72d70884dbdb580a49d Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Fri, 8 Sep 2006 11:37:31 +0000 Subject: [PATCH] close #34697: classes should be defined before use git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@219625 c90b9560-bf6c-de11-be94-00142212c4b1 --- appendices/migration5.xml | 7 +++++-- language/oop5/basic.xml | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/appendices/migration5.xml b/appendices/migration5.xml index 2e11765817..92f849cf1d 100755 --- a/appendices/migration5.xml +++ b/appendices/migration5.xml @@ -1,5 +1,5 @@ - + Migrating from PHP 4 to PHP 5 @@ -95,7 +95,10 @@ - You should always define your classes prior to use. + In some cases classes must be declared before use. It only happens if + some of the new features of PHP 5 (such as interfaces) are used. + Otherwise the behaviour is the old. diff --git a/language/oop5/basic.xml b/language/oop5/basic.xml index 7d8033353f..c9ed397de8 100644 --- a/language/oop5/basic.xml +++ b/language/oop5/basic.xml @@ -1,5 +1,5 @@ - + The Basics @@ -131,7 +131,9 @@ EOD; assigned to a variable. An object will always be assigned when creating a new object unless the object has a constructor defined that throws an - exception on error. + exception on error. Classes + should be defined before instantiation (and in some cases this is a + requirement). Creating an instance