3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = []; try { (function(int $inteiro){})('string'); } catch(\Throwable $e) { var_dump($e); }
based on u1lA9
Output for 7.0.0 - 7.2.0
object(TypeError)#2 (7) { ["message":protected]=> string(105) "Argument 1 passed to {closure}() must be of the type integer, string given, called in /in/RHMOm on line 6" ["string":"Error":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/RHMOm" ["line":protected]=> int(6) ["trace":"Error":private]=> array(1) { [0]=> array(4) { ["file"]=> string(9) "/in/RHMOm" ["line"]=> int(6) ["function"]=> string(9) "{closure}" ["args"]=> array(1) { [0]=> string(6) "string" } } } ["previous":"Error":private]=> NULL }
Output for 5.4.11 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/RHMOm on line 6
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/RHMOm on line 3
Process exited with code 255.