#26640 [Opn->Fbk]: __autoload() not invoked by Reflection classes
| From: | sniper@php.net | Date: | Wed, 31 Dec 2003 01:17:37 +0000 |
| Subject: | #26640 [Opn->Fbk]: __autoload() not invoked by Reflection classes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52624@lists.php.net to get a copy of this message | ||
ID: 26640
Updated by: sniper@php.net
Reported By: adam at trachtenberg dot com
-Status: Open
+Status: Feedback
Bug Type: Zend Engine 2 problem
Operating System: *
PHP Version: 5CVS-2003-12-16 (dev)
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2003-12-16 13:19:47] adam at trachtenberg dot com
Description:
------------
The Reflection classes do not trigger __autoload() when
the class is undefined. This works correctly for
userland classes.
Reproduce code:
---------------
function __autoload($c) {
class autoload_class {
public function __construct() {
print "autoload success\n";
}
}
}
Reflection:export(new Reflection_Class('autoload_class'));
Expected result:
----------------
autoload success
Class [ <user> class autoload_class ] {
@@ /Users/adam/Desktop/autoload.php 4-10
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [1] {
Method [ <user> <ctor> public method __construct ] {
@@ /Users/adam/Desktop/autoload.php 6 - 8
}
}
}
Actual result:
--------------
PHP Fatal error: Uncaught exception
'reflection_exception' with message 'Class
autoload_class does not exist' in /Users/adam/Desktop/
autoload.php:10
Stack trace:
#0 {main}
thrown in /Users/adam/Desktop/autoload.php on line 10
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26640&edit=1