__autoload() not invoked by Reflection classes
| Bug #26640 | __autoload() not invoked by Reflection classes | ||||
|---|---|---|---|---|---|
| Submitted: | 2003-12-16 13:19 UTC | Modified: | 2004-01-16 16:06 UTC | ||
| From: | adam at trachtenberg dot com | Assigned: | |||
| Status: | Closed | Package: | Scripting Engine problem | ||
| PHP Version: | 5CVS-2003-12-16 (dev) | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2003-12-16 13:19 UTC] 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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2004-01-16 16:06 UTC] sniper@php.net