<?php class Super { protected $var = 'Nope'; public function getVar() { return $this->var; } } class Sub extends Super { protected $var = 'Hi there!'; } $sub = new Sub(); var_dump($sub->getVar());
You have javascript disabled. You will not be able to edit any code.