3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class GoodBigMamaHuman { protected $name = 'Payton'; public function __construct() { var_dump($this->name); } public function setName($name) { $this->name = $name; } public function getName() { return $this->age; } } class GoodLilBabyHuman extends GoodBigMamaHuman { public function __construct() { var_dump($this->name); } } $mama = new GoodBigMamaHuman(); $baby = new GoodLilBabyHuman();
based on hbFAF
Output for 5.3.18 - 7.2.0
string(6) "Payton" string(6) "Payton"