ID: 28114
Updated by: [EMAIL PROTECTED]
Reported By: adam at trachtenberg dot com
-Status: Open
+Status: Assigned
Bug Type: Zend Engine 2 problem
Operating System: *
-PHP Version: 5CVS-2004-04-29
+PHP Version: 5CVS-2005-01-10
-Assigned To:
+Assigned To: helly
New Comment:
Still an issue?
Previous Comments:
------------------------------------------------------------------------
[2004-04-23 05:49:55] adam at trachtenberg dot com
Your example is shorter, but I wanted to make it clear
that things worked okay for user defined classes. BTW, I
didn't know this was a known issue.
------------------------------------------------------------------------
[2004-04-23 01:50:29] [EMAIL PROTECTED]
This is a known issue for several internal classes.
Btw, why don't you use:
php -r 'ReflectionClass::export($argv[1]);' ?
------------------------------------------------------------------------
[2004-04-23 01:42:41] adam at trachtenberg dot com
Description:
------------
The Reflection API doesn't return parameter information
for built-in classes, like it does for user-defined
classes.
Reproduce code:
---------------
// userland class
class ReflectionTest {
function test($foo, $bar) {}
}
Reflection::export(
new ReflectionClass('ReflectionTest'));
// example of a system class
Reflection::export(new ReflectionClass('Exception'));
Expected result:
----------------
The "methods" section of "Exception" should look like
similar to the "methods" section of "ReflectionTest"
In other words, there should be a "Parameters" block for
methods, like __construct(), that take parameters. This
doesn't just apply to Exception, but all classes written
in C.
Actual result:
--------------
ReflectionTest:
- Methods [1] {
Method [ <user> public method test ] {
@@ /www/reflection.php 9 - 9
- Parameters [2] {
Parameter #0 [ $foo ]
Parameter #1 [ $bar ]
}
}
Exception:
- Methods [9] {
Method [ <internal> final private method __clone ] {
}
Method [ <internal> <ctor> method __construct ] {
}
Method [ <internal> final public method getMessage ]
{
}
Method [ <internal> final public method getCode ] {
}
Method [ <internal> final public method getFile ] {
}
Method [ <internal> final public method getLine ] {
}
Method [ <internal> final public method getTrace ] {
}
Method [ <internal> final public method
getTraceAsString ] {
}
Method [ <internal> public method __toString ] {
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28114&edit=1