No private variable ?
| From: | Reuben D Budiardja | Date: | Mon, 02 Oct 2000 23:37:37 +0000 |
| Subject: | No private variable ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18327@lists.php.net to get a copy of this message | ||
Suppose I have a class: connect_db, and a variable $passwd, which I want to be private in that class.
What can I do to prevent someone do something like:
$myApp = new connect_db();
echo $myApp->passwd;
I'm running Apache server with PHP 3.0.8, and indeed I can do that to access variable in my API classes, which make it really vulnerable. Any suggestion? is this problem fixed in php4?
Thanks
Reuben D. Budiardja