3v4l.org

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