3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A{ protected $stuff; function setStuff(int $foo){ $this->stuff = $foo; } function getStuff(): int{ return $this->stuff; } } $x = new A; var_export($x);
Output for 7.0.0 - 7.2.0
A::__set_state(array( 'stuff' => NULL, ))
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/gfXIC on line 8
Process exited with code 255.