3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function f(stdClass $a) {} try { f(0); } catch (Exception $e) { echo "Caught exception: ".get_class($e)."\n"; }
based on TegfY
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught TypeError: Argument 1 passed to f() must be an instance of stdClass, integer given, called in /in/pInJI on line 4 and defined in /in/pInJI:2 Stack trace: #0 /in/pInJI(4): f(0) #1 {main} thrown in /in/pInJI on line 2
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Catchable fatal error: Argument 1 passed to f() must be an instance of stdClass, integer given, called in /in/pInJI on line 4 and defined in /in/pInJI on line 2
Process exited with code 255.