From: RQuadling at GMail dot COM
Operating system: Windows
PHP version: 5.1.2
PHP Bug Type: SPL related
Bug description: Reflection on exception returns too many methods
Description:
------------
Creating a reflection on the inbuilt exception class returns an unexpected
duplication of all the methods.
Reproduce code:
---------------
<?php
Reflection::export(new ReflectionClass('abstract_generic_exception'));
?>
Expected result:
----------------
Class [ <internal> class Exception ] {
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [6] {
Property [ <default> protected $message ]
Property [ <default> private $string ]
Property [ <default> protected $code ]
Property [ <default> protected $file ]
Property [ <default> protected $line ]
Property [ <default> private $trace ]
}
- Methods [9] {
Method [ <internal> final private method __clone ] {
}
Method [ <internal, ctor> public method __construct ] {
- Parameters [2] {
Parameter #0 [ <required> $message ]
Parameter #1 [ <required> $code ]
}
}
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 ] {
}
}
}
Actual result:
--------------
Class [ <internal> class Exception ] {
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [6] {
Property [ <default> protected $message ]
Property [ <default> private $string ]
Property [ <default> protected $code ]
Property [ <default> protected $file ]
Property [ <default> protected $line ]
Property [ <default> private $trace ]
}
- Methods [18] {
Method [ <internal> final private method __clone ] {
}
Method [ <internal, ctor> public method __construct ] {
- Parameters [2] {
Parameter #0 [ <required> $message ]
Parameter #1 [ <required> $code ]
}
}
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 ] {
}
Method [ <internal> public method __toString ] {
}
Method [ <internal> final public method getTraceAsString ] {
}
Method [ <internal> final public method getTrace ] {
}
Method [ <internal> final public method getLine ] {
}
Method [ <internal> final public method getFile ] {
}
Method [ <internal> final public method getCode ] {
}
Method [ <internal> final public method getMessage ] {
}
Method [ <internal, ctor> public method __construct ] {
- Parameters [2] {
Parameter #0 [ <required> $message ]
Parameter #1 [ <required> $code ]
}
}
Method [ <internal> final private method __clone ] {
}
}
}
--
Edit bug report at http://bugs.php.net/?id=36543&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=36543&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=36543&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=36543&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36543&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=36543&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36543&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36543&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36543&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36543&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36543&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=36543&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=36543&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36543&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36543&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36543&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36543&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36543&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36543&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36543&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36543&r=mysqlcfg