obj = new test2(); } } class test2 { public function __construct() { parent::$test = 'win'; } } $test = new test1(); echo $test->test;