php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: guth at fiifo dot u-psud dot fr
New email:
PHP Version: OS:

 

 [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 commitsRelated reports
 [2004-10-10 15:01 UTC] guth at fiifo dot u-psud dot fr
oops, i swaped expected and actual results. 
sorry :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 10:01:29 2024 UTC