3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = function ($it) : string { return 1; }; $a();
based on nQB93
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 0 passed in /in/lPBEp on line 7 and exactly 1 expected in /in/lPBEp:3 Stack trace: #0 /in/lPBEp(7): {closure}() #1 {main} thrown in /in/lPBEp on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Warning: Missing argument 1 for {closure}(), called in /in/lPBEp on line 7 and defined in /in/lPBEp on line 3
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/lPBEp on line 3
Process exited with code 255.