3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { public function metoda(array $a = 1) { var_dump($a); } } $a = new Test(); $a->metoda();
based on ufp2i
Output for 7.0.3 - 7.1.7
Fatal error: Default value for parameters with array type can only be an array or NULL in /in/SNhes on line 5
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.2
Fatal error: Default value for parameters with array type hint can only be an array or NULL in /in/SNhes on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Default value for parameter a with array type hint can only be an array or NULL in /in/SNhes:5 Stack trace: #0 {main}
Process exited with code 255.