#30381 [Opn]: Strange results with get_class_vars()
| From: | guth at fiifo dot u-psud dot fr | Date: | Sun, 10 Oct 2004 13:01:06 +0000 |
| Subject: | #30381 [Opn]: Strange results with get_class_vars() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67358@lists.php.net to get a copy of this message | ||
ID: 30381
User updated by: guth at fiifo dot u-psud dot fr
Reported By: guth at fiifo dot u-psud dot fr
Status: Open
Bug Type: Class/Object related
Operating System: *
PHP Version: 5CVS-2004-10-10 (dev)
New Comment:
oops, i swaped expected and actual results.
sorry :)
Previous Comments:
------------------------------------------------------------------------
[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