3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public $a = 3; protected $b = 4; private $c = 5; } class B extends A { public $a = 9; public $b = 8; private $c = 7; function doIt() { return $this->a + $this->b + $this->c; } } $b = new B(); echo $b->doIt();
based on DT2R1
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
24