3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function aaaa(array $a) { } try{ aaaa('test'); } catch (\Exception $e) { $return = ''; }
based on UlYZ6
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught TypeError: Argument 1 passed to aaaa() must be of the type array, string given, called in /in/V9mgb on line 6 and defined in /in/V9mgb:2 Stack trace: #0 /in/V9mgb(6): aaaa('test') #1 {main} thrown in /in/V9mgb on line 2
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught TypeError: Argument 1 passed to aaaa() must be an instance of array, string given in /in/V9mgb:4 Stack trace: #0 /in/V9mgb(6): aaaa() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Catchable fatal error: Argument 1 passed to aaaa() must be of the type array, string given, called in /in/V9mgb on line 6 and defined in /in/V9mgb on line 2
Process exited with code 255.