#30381 [NEW]: Strange results with get_class_vars()

From: Date: Sun, 10 Oct 2004 11:48:36 +0000
Subject: #30381 [NEW]: Strange results with get_class_vars()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-67357@lists.php.net to get a copy of this message
From: guth at fiifo dot u-psud dot fr Operating system: * PHP version: 5CVS-2004-10-10 (dev) PHP Bug Type: Class/Object related Bug description: Strange results with get_class_vars() 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 bug report at http://bugs.php.net/?id=30381&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30381&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30381&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30381&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30381&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30381&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30381&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30381&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30381&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30381&r=support Expected behavior: http://bugs.php.net/fix.php?id=30381&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30381&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30381&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30381&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30381&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30381&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30381&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30381&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30381&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30381&r=mysqlcfg

« previous php.bugs (#67357) next »