3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php eval(' class MyException { public function __construct(HH\\string $something = ""){ } } ');
Output for 7.0.20, 7.1.5 - 7.2.6
Fatal error: Cannot use 'HH\string' as class name as it is reserved in /in/WQC75(3) : eval()'d code on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.14, 7.1.0
Fatal error: Cannot use 'HH\string' as class name as it is reserved in /in/WQC75(9) : 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/WQC75(9) : eval()'d code on line 3
Process exited with code 255.