ID: 26640
User updated by: adam at trachtenberg dot com
Reported By: adam at trachtenberg dot com
-Status: Feedback
+Status: Open
Bug Type: Zend Engine 2 problem
Operating System: *
PHP Version: 5CVS-2003-12-16 (dev)
New Comment:
Yes, this is still broken, but I'm now getting errors
with my original example. Here is an updated test case:
main file:
function __autoload($c) {
include "autoload_class.php";
}
$a = new Reflection_Class('autoload_class');
---
included file: autoload_class.php:
class autoload_class {
public function __construct() {
print "autoload success\n";
}
}
Sorry I need to use two files, but I can no longer
define a class within __autoload().
Previous Comments:
------------------------------------------------------------------------
[2003-12-30 20:17:37] [EMAIL PROTECTED]
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
------------------------------------------------------------------------
[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