note 23104 added to function.get-class-vars

From: Date: Tue, 09 Jul 2002 15:58:03 +0000
Subject: note 23104 added to function.get-class-vars
Groups: php.notes 
Request: Send a blank email to php-notes+get-32802@lists.php.net to get a copy of this message
Beginning with php 4.2.1, the given example is wrong because this function no longer ignores uninitialized variables. Example: <? class MyTest { var $classVar1 = 'Class Var 1'; var $classVar2; } echo "<pre>"; print_r( get_class_vars('MyTest')); echo "</pre>"; ?> The output is: Array ( [classVar1] => Class Var 1 [classVar2] => ) -- http://www.php.net/manual/en/function.get-class-vars.php http://master.php.net/manage/user-notes.php?action=edit+23104 http://master.php.net/manage/user-notes.php?action=delete+23104 http://master.php.net/manage/user-notes.php?action=reject+23104

« previous php.notes (#32802) next »