From: torr0101 at hotmail dot com Operating system: Windows 2003 Standard PHP version: 5.0.0RC3 PHP Bug Type: *General Issues Bug description: Will not execute extended class from before declaration
Description: ------------ When you create a normal class you can call it before the class is defined on the page. However, when you extend a class you cannot instantiate the class before it is declared. It will not be found. Reproduce code: --------------- <?php require_once('controller.php'); $l = new Login(); class Login extends Controller { function __construct() { parent::__construct(); echo('Extended'); } } ?> Expected result: ---------------- Extended Actual result: -------------- Fatal error: Class 'Login' not found in ...\test.php on line 4 -- Edit bug report at http://bugs.php.net/?id=29041&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29041&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29041&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29041&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29041&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29041&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29041&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29041&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29041&r=support Expected behavior: http://bugs.php.net/fix.php?id=29041&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29041&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29041&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29041&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29041&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29041&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29041&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29041&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29041&r=float