Mega Code Archive
Categories
/
Php
/
Class
Protect the class from being misused by accessing the members directly
a = $val; } function get_value() { return $this->a; } } $obj = new myclass; $obj->set_value(123); echo "Member a = " . $obj->get_value() . "\n"; ?>