Is there a way to disable adding properties into a class from an instance of the class.
What I mean is this:
Consider this class:
class a { pri
Perhaps you can implement __set() and throw an exception from there:
class a { private $v1; public $v2; public function __set($name, $value) { throw new Exception("Cannot add new property \$$name to instance of " . __CLASS__); } }