#28058 [Fbk->NoF]: __autoload called for every class declaration
| From: | php-bugs at lists dot php dot net | Date: | Mon, 26 Apr 2004 23:00:04 +0000 |
| Subject: | #28058 [Fbk->NoF]: __autoload called for every class declaration | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-58833@lists.php.net to get a copy of this message | ||
ID: 28058
Updated by: php-bugs@lists.php.net
Reported By: alex_boyer at hotmail dot com
-Status: Feedback
+Status: No Feedback
Bug Type: Zend Engine 2 problem
Operating System: Windows 2000 Pro
PHP Version: 5.0.0RC1
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2004-04-19 20:34:50] helly@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-04-19 14:52:44] alex_boyer at hotmail dot com
Description:
------------
__autoload is called for every class declaration that extends a parent
class, even if the parent declaration file is included.
Reproduce code:
---------------
index.php:
require_once "b.php";
function __autoload($theclass){
echo "Auto load\n";
require_once($theclass.".php");
}
$obj = new b();
$obj->hello();
b.php:
require_once "a.php";
class b extends a{
function hello() { echo "B";}
}
a.php:
class a{
function hello() {echo "A";}
}
Expected result:
----------------
B
Actual result:
--------------
Auto load
B
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28058&edit=1