PHP5: static class variables

From: Date: Tue, 02 Mar 2004 13:16:47 +0000
Subject: PHP5: static class variables
Groups: php.general 
Request: Send a blank email to php-general+get-179241@lists.php.net to get a copy of this message
hello again, once again a question about class properties, this time more reasonable... Is there a possibility to check wether a static variable is set or not? <?php class MyClass { public static $var; } print_r(get_class_vars("MyClass")); ?> will not show $var, cause it's static. an expression like if(MyClass::$somevar) {...} ends up to a fatal error because $somevar is not declared. is there a function to check if $somevar is declared? unfortunately reflection api is VERY buggy yet... thanks in advance, vivi

« previous php.general (#179241) next »