diff options
author | Andrey Hristov <andrey@php.net> | 2004-01-24 00:14:43 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2004-01-24 00:14:43 +0000 |
commit | 85de35e47081217f5a72bd79644cdca796e4315a (patch) | |
tree | bfca29d54e8ec0fc6f56fd82c8122cda40200f70 /README.PHP4-TO-PHP5-THIN-CHANGES | |
parent | eff2006e4efce7fec346aa3d3da03583da3854b6 (diff) | |
download | php-git-85de35e47081217f5a72bd79644cdca796e4315a.tar.gz |
Adding note about declaration first use after that for classes.
#I had no time recently to add this but since a user complained on
#internals....
Diffstat (limited to 'README.PHP4-TO-PHP5-THIN-CHANGES')
-rw-r--r-- | README.PHP4-TO-PHP5-THIN-CHANGES | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/README.PHP4-TO-PHP5-THIN-CHANGES b/README.PHP4-TO-PHP5-THIN-CHANGES index 0ef64e40fe..a8caec956e 100644 --- a/README.PHP4-TO-PHP5-THIN-CHANGES +++ b/README.PHP4-TO-PHP5-THIN-CHANGES @@ -52,3 +52,19 @@ always make argc and argv available in the CLI version regardless of the variables_order setting. As in, the CLI version will now always populate the global $argc and $argv variables. + +8. Classes should be declared before used : + <?php + $test = new fubar(); + $test->echo(); + + class fubar { + function echo() { + echo 'fubar'; + } + } + ?> + This script is perfectly valid and works in PHP4 but with PHP5 there + will be a fatal error like : + Fatal error: Class 'fubar' not found in .... + If there is defined function __autoload() it will be called. |