PHP5: check if a variable is declared as private
| From: | Vivian Steller | Date: | Tue, 02 Mar 2004 09:59:37 +0000 |
| Subject: | PHP5: check if a variable is declared as private | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-179215@lists.php.net to get a copy of this message | ||
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