3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Goofy { protected $a; public function __constuct($a){ $this->a = $a; } public function getA(){ return $this->a; } } $a = 10; $goofy = new Goofy($a = 4); echo $a; echo $goofy->getA();
based on ZRINf
Output for 7.1.0 - 7.2.0
4
Output for 5.3.18 - 7.0.20
10