3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private $value; public function setValue($val) { $this->value = $val; } public function getValue() { return $this->value; } } class B extends A { private $value; public function setValue($val) { $this->value = $val; } } $a = new A; $b = new B; $a->setValue(123); $b->setValue(544); var_dump($a->getValue(), $b->getValue(), $a, $b);
based on jeQ2E