|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-02-27 14:55 UTC] RQuadling at GMail dot COM
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 ] {
}
}
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
AMEND: Reflecting on any internal class reports duplicate methods. <?php foreach(get_declared_classes() as $s_class) { Reflection::export(new ReflectionClass($s_class)); } ?> Run the following code into a log file to see duplicates.<?php Reflection::export(new ReflectionClass('Exception')); ?> Ah! The Win32 builds are not working. Last available download from http://snaps.php.net/win32 is February 20th