#30381 [Opn->Asn]: Strange results with get_class_vars()
| From: | derick@php.net | Date: | Mon, 11 Oct 2004 05:59:28 +0000 |
| Subject: | #30381 [Opn->Asn]: Strange results with get_class_vars() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67387@lists.php.net to get a copy of this message | ||
ID: 30381
Updated by: derick@php.net
Reported By: guth at fiifo dot u-psud dot fr
-Status: Open
+Status: Assigned
Bug Type: Class/Object related
Operating System: *
PHP Version: 5CVS-2004-10-10 (dev)
-Assigned To:
+Assigned To: helly
Previous Comments:
------------------------------------------------------------------------
[2004-10-10 15:01:05] guth at fiifo dot u-psud dot fr
oops, i swaped expected and actual results.
sorry :)
------------------------------------------------------------------------
[2004-10-10 13:48:35] guth at fiifo dot u-psud dot fr
Description:
------------
I think that get_class_vars() should have the same
behaviour that get_class_method().
The problem is that get_class_method() prints static
methods, but get_class_vars() doesn't prints static
properties.
The documentation doesn't say anything on static
properties, so i think that get_class_vars() should print
static properties.
Reproduce code:
---------------
<?php
class plop {
public static $plip;
public static function plip() { }
}
var_dump(get_class_methods('plop'));
var_dump(get_class_vars('plop'));
?>
Expected result:
----------------
array(1) { [0] => string(4) "plip" }
array(0) {}
Actual result:
--------------
array(1) { [0] => string(4) "plip" }
array(1) { [0] => string(4) "plip" }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30381&edit=1