Re: check if a variable is declared as private

From: Date: Tue, 02 Mar 2004 12:38:38 +0000
Subject: Re: check if a variable is declared as private
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-179236@lists.php.net to get a copy of this message
The word private says it all - If you create a object, you are not going to be able to use it, because its private to that class. Its a class variable, not a object variable "Vivian Steller" <news@eecoo.de> wrote in message news:20040302100511.58007.qmail@pb1.pair.com... > Hello, > > is it possible to check if a variable declared as "private"? > I do not want to use reflection api in this case... > > <?php > class MyClass { > private $var = "something"; > } > > $obj = new MyClass(); > > // something like this would be nice... > $isPrivate = isPrivate($obj, "var"); > ?> > > best regards, > vivi

« previous php.general (#179236) next »