3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php eval(' class MyException { public function __construct(string $something = ""){ } } ');
Output for 7.0.0 - 7.1.0
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Default value for parameter something with a class type hint can only be NULL in /in/N0cC6(9)(990c6b2a60a9cd535f04c89eedcf4754) : eval()'d code on line 3
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Default value for parameters with a class type hint can only be NULL in /in/N0cC6(9) : eval()'d code on line 3
Process exited with code 255.