From:             virgilp at gmail dot com
Operating system: Windows XP SP3
PHP version:      5.2.10
PHP Bug Type:     Reflection related
Bug description:  Reflection doesn't seem to work properly on MySqli

Description:
------------
There are several things that go wrong with reflection on MySqli. 
1. First and foremost - extracting mysqli::bind_param signature yields 
strange results:  public function bind_param($);
And the parameter in question (printed as "$") is in fact:
ReflectionParameter::__set_state(array(
   'name' => NULL,
))  /// Null name!!
I believe this is actually related to bug #45578 - but that one has 
been closed as being related to something completely different.

2. another odd thing is that reflection returns "final protected class 
mysqli_warning " (and a class can't be "protected").

3. Several properties seem to be completely missing from reflection - 
e.g. the "host_info" property of mysqli.

4. Parameters are not shown in member methods - e.g. mysqli::prepare 
is shown to have 0 parameters (when in fact, it receives a string 
parameter).

Reproduce code:
---------------
$ext = new ReflectionExtension('mysqli');
$class_arr = $ext->getClassNames();
foreach($class_arr as $cls_name){
    DumpClass($cls_name);
}
 // I could give the implementation of DumpClass if needed, but it's
straight out of the "reflection" examples, it prints the modifiers, class
name, "extends", "implements" & properties/methods


Expected result:
----------------
MySqli class seen through reflection the same way as it is documented on 
www.php.net

Actual result:
--------------
Wrong output from reflection (as listed in "description")

-- 
Edit bug report at http://bugs.php.net/?id=49216&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49216&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49216&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49216&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49216&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49216&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49216&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49216&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49216&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49216&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49216&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49216&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49216&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49216&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49216&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49216&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49216&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49216&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49216&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49216&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49216&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49216&r=mysqlcfg

Reply via email to