Bug #54708 [NEW]: Fatal error by defined class with inheritance and wrong order and including

From: Date: Wed, 11 May 2011 10:30:32 +0000
Subject: Bug #54708 [NEW]: Fatal error by defined class with inheritance and wrong order and including
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-160677@lists.php.net to get a copy of this message
From: Operating system: Debian Squeeze PHP version: Irrelevant Package: Class/Object related Bug Type: Bug Bug description:Fatal error by defined class with inheritance and wrong order and including Description: ------------ Script "test.php" produces Fatal error in relation of writing order of classes. If that missing class defined in same file, at the same place like require_once() (by replacing), no error will appear :O Test script: --------------- class file: test.class.php <?php class formularEssentials{} ?> main file: test.php <?php require_once 'test.class.php'; //contain "formularEssentials" class formularBeta extends formularAlpha{} class formularAlpha extends formularEssentials{} ?> Expected result: ---------------- nothing, blank screen. No "Fatal error" should be displayed. Actual result: -------------- Fatal error: Class 'formularAlpha' not found in test.php -- Edit bug report at http://bugs.php.net/bug.php?id=54708&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54708&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54708&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54708&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54708&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54708&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54708&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54708&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54708&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54708&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54708&r=support Expected behavior: http://bugs.php.net/fix.php?id=54708&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54708&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54708&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54708&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54708&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54708&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54708&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54708&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54708&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54708&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54708&r=mysqlcfg

« previous php.bugs (#160677) next »