ID: 39758
User updated by: bacher at bash-it dot de
Reported By: bacher at bash-it dot de
Status: Open
Bug Type: Class/Object related
Operating System: Linux Ubuntu 6.0
PHP Version: 5.2.0
New Comment:

Sorry, just while reading. The error Message is not:
Fatal error: Class 'Bar' not found in foo.php on line xx

but
Fatal error: Class 'Foo' not found in foo.php on line xx

sorry for that. i hope you can reproduce it.


Previous Comments:
------------------------------------------------------------------------

[2006-12-06 16:31:45] bacher at bash-it dot de

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 xx

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 xx


------------------------------------------------------------------------


--
Edit this bug report at [url]http://bugs.php.net/?id=39758&edit=1[/url]