php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29447 Reflection API issues.
Submitted: 2004-07-29 18:42 UTC Modified: 2004-08-16 10:53 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: wb at pro-net dot co dot uk Assigned: helly (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.0.1 OS: *
Private report: No CVE-ID: None
 [2004-07-29 18:42 UTC] wb at pro-net dot co dot uk
Description:
------------
Hi,

I have found two issues with the reflection api in php5.

1. The reflection API does not invoke the __autoload() function when checking to see if a class exists. Therefore if you rely on the __autoload() function to call the required files you get a 'ReflectionException' exception  with message 'Class XXXX does not exist'

2. The reflection API returns object of UNKNOWN type in the constants array when you call the $class->getConstants() method when a class constant is defined like so:

const BBB = SameClass::AAA;




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-16 10:16 UTC] kevinphpdotnet at stormtide dot ca
In addition to the issues reported, It will also invoke __autoload to try to find the Reflection_Class class generating a

Warning: __autoload(... file ...) failed to open stream.

as its trying to find the source file to locate the reflection api base classes.
 [2004-08-16 10:53 UTC] helly@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Reflection_Class does not exist it is ReflectionClass .
Apart from that the bug is fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC