private var in class

From: Date: Sun, 01 Oct 2000 23:21:12 +0000
Subject: private var in class
Groups: php.general 
Request: Send a blank email to php-general+get-18231@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

« previous php.general (#18231) next »