andrey Fri Jan 23 19:14:46 2004 EDT
Modified files:
/php-src README.PHP4-TO-PHP5-THIN-CHANGES
Log:
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....
http://cvs.php.net/diff.php/php-src/README.PHP4-TO-PHP5-THIN-CHANGES?r1=1.11&r2=1.12&ty=u
Index: php-src/README.PHP4-TO-PHP5-THIN-CHANGES
diff -u php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.11
php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.12
--- php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.11 Sat Jan 17 15:28:09 2004
+++ php-src/README.PHP4-TO-PHP5-THIN-CHANGES Fri Jan 23 19:14:43 2004
@@ -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.
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php