3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = function(integer $d) { var_dump($d); }; $d('test');
based on W5YTZ
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught TypeError: Argument 1 passed to {closure}() must be an instance of integer, string given, called in /in/cn2Y8 on line 7 and defined in /in/cn2Y8:3 Stack trace: #0 /in/cn2Y8(7): {closure}('test') #1 {main} thrown in /in/cn2Y8 on line 3
Process exited with code 255.
Output for 5.3.20 - 5.6.21
Catchable fatal error: Argument 1 passed to {closure}() must be an instance of integer, string given, called in /in/cn2Y8 on line 7 and defined in /in/cn2Y8 on line 3
Process exited with code 255.