3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo(string $foo = null) {} foo('foo'); foo(null); foo(); foo(1);
based on NrMZ9
Output for 7.0.0 - 7.3.0beta1
Output for 5.6.0 - 5.6.28
Catchable fatal error: Argument 1 passed to foo() must be an instance of string, string given, called in /in/7e1bV on line 5 and defined in /in/7e1bV on line 3
Process exited with code 255.