note 114525 deleted from language.oop5.visibility by sobak
| From: | sobak@php.net | Date: | Sun, 20 Nov 2016 00:12:15 +0000 |
| Subject: | note 114525 deleted from language.oop5.visibility by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207209@lists.php.net to get a copy of this message | ||
Note Submitter: hasan4it at gmail dot com
----
class MyClass
{
public $public = 'Public';
protected $protected = 'Protected';
private $private = 'Private';
function printHello()
{
echo $this->public;
echo $this->protected;
echo $this->private;
}
}
$obj = new MyClass();
print_r($obj)
it gives me the value of all variables
How can I hide this?