Re: Getting static member for a class which name is stored

From: Date: Mon, 29 Nov 2004 00:20:30 +0000
Subject: Re: Getting static member for a class which name is stored
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-203035@lists.php.net to get a copy of this message
Greg Beaver wrote:
How about: <?php class Myclass {
    public static $myvar = "easy enough";
} echo Myclass::$myvar; ?> The only problem is if you want to be able to generically access a static variable from any class that has it, like $Myclass::$myvar. Greg
Hi Greg, Yup, Exactly That is the problem we are attempting to deal with :) (hence the name of this thread) Best Regards Jake Press

« previous php.general (#203035) next »