#26536 [Opn->Bgs]: constant() should accept an Array in ZE2
| From: | andrey@php.net | Date: | Mon, 02 May 2005 09:24:14 +0000 |
| Subject: | #26536 [Opn->Bgs]: constant() should accept an Array in ZE2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-78504@lists.php.net to get a copy of this message | ||
ID: 26536
Updated by: andrey@php.net
Reported By: rauh at onlinehome dot de
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
PHP Version: 5.0.0b2 (beta2)
New Comment:
use ReflectionClass::hasConstant() from the reflection API :
http://php.net/manual/en/language.oop5.reflection.php
Previous Comments:
------------------------------------------------------------------------
[2003-12-06 04:37:05] rauh at onlinehome dot de
Description:
------------
I think since ZE2 and Class - Constants, constant() should accept an
Array like call_user_func does.
Reproduce code:
---------------
$bar = 'aConstant';
echo constant(array('FooClass', $bar))
echo constant(array(new FooClass, $bar))
Expected result:
----------------
The Value of FooClass::aConstant
Actual result:
--------------
Array to String Conversion.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26536&edit=1