<?php include("magic.php"); class Test extends ReadOnly { public $_test = "This is a read only property"; } ini_set('display_errors', 1); error_reporting(E_ALL); $x = new Test(); $x->_test = "aaa";