From: bacher at bash-it dot de Operating system: Linux Ubuntu 6.0 PHP version: 5.2.0 PHP Bug Type: Class/Object related Bug description: Error message on extending a class that implements a interface
Description: ------------ If one tries to extend a class that implements a Interface, php5 produces a error message: Fatal error: Class 'Bar' not found in foo.php on line xxxxx I use the CLI Version of php. PHP 5.1.2 (cli) (built: Nov 2 2006 12:29:42) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies Reproduce code: --------------- <?php class Bar extends Foo { } interface i { } class Foo implements i { } ?> Expected result: ---------------- started on the commandline with the command: php5 foo.php it should return simply nothing. But it throws an error. if you just extend the class after you defined it it does not throw the error: <?php interface i { } class Foo implements i { } class Bar extends Foo { } ?> Since this behaviour is not reproducable with a missing Interface, i think this is a Error on Interfaces. Actual result: -------------- The error message Fatal error: Class 'Bar' not found in foo.php on line xxxxx -- Edit bug report at http://bugs.php.net/?id=39758&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39758&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39758&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39758&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39758&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39758&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39758&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39758&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39758&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39758&r=support Expected behavior: http://bugs.php.net/fix.php?id=39758&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39758&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39758&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39758&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39758&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39758&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39758&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39758&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39758&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39758&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39758&r=mysqlcfg