3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo {} $a = null; $f = new Foo($a = 123); var_dump($a); // NULL <?php class Foo { function __constructor(){} } $a = null; $f = new Foo($a = 123); var_dump($a); // int(123)
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected '<' in /in/piC9j on line 8
Process exited with code 255.