PHP :: Bug #30381 :: Strange results with get_class_vars()
| Bug #30381 | Strange results with get_class_vars() | ||||
|---|---|---|---|---|---|
| Submitted: | 2004-10-10 13:48 UTC | Modified: | 2004-10-13 00:22 UTC | ||
| From: | guth at fiifo dot u-psud dot fr | Assigned: | helly (profile) | ||
| Status: | Closed | Package: | Class/Object related | ||
| PHP Version: | 5.0.2 | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2004-10-10 13:48 UTC] 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" }
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2004-10-10 15:01 UTC] guth at fiifo dot u-psud dot fr