#48553 [Opn->Fbk]: ReflectionFunction of class_exists() return no parameters

From: Date: Mon, 15 Jun 2009 11:06:02 +0000
Subject: #48553 [Opn->Fbk]: ReflectionFunction of class_exists() return no parameters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-138308@lists.php.net to get a copy of this message
 ID:               48553
 Updated by:       scottmac@php.net
 Reported By:      fhardy at noparking dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Reflection related
 Operating System: FreeBSD 7.1
 PHP Version:      5.2.9
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

This is fixed in 5.3.0+


Previous Comments:
------------------------------------------------------------------------

[2009-06-15 09:27:00] fhardy at noparking dot net

Description:
------------
Using reflectionFunction class on PHP function class_exists() to have
its parameters failed.

Reproduce code:
---------------
<?php

$function = new reflectionFunction('class_exists');
$parameters = $function->getParameters();
echo sizeof($parameters) == 2 ? 'OK, class_exists() take 2 arguments' :
'KO, class_exists() take ' . sizeof($parameters) . ' arguments';

?>

Expected result:
----------------
OK, class_exists() take 2 arguments

Actual result:
--------------
KO, class_exists() take 0 arguments


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48553&edit=1



Thread (2 messages)

« previous php.bugs (#138308) next »