v; } } class C extends P { public function __construct() { $this->v = 'It works!'; } } $o = new C(); $o->test(); ?>