3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function bla(array $arr = array()) { var_dump($arr); } bla(); bla(null); bla(array());
Output for 7.0.0 - 7.1.0
array(0) { } Fatal error: Uncaught TypeError: Argument 1 passed to bla() must be of the type array, null given, called in /in/XoEaL on line 9 and defined in /in/XoEaL:4 Stack trace: #0 /in/XoEaL(9): bla(NULL) #1 {main} thrown in /in/XoEaL on line 4
Process exited with code 255.
Output for hhvm-3.12.0
array(0) { } Catchable fatal error: Argument 1 passed to bla() must be an instance of array, null given in /in/XoEaL on line 6
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.20 - 5.6.28
array(0) { } Catchable fatal error: Argument 1 passed to bla() must be of the type array, null given, called in /in/XoEaL on line 9 and defined in /in/XoEaL on line 4
Process exited with code 255.
Output for 5.4.0 - 5.4.19
array(0) { } Catchable fatal error: Argument 1 passed to bla() must be of the type array, null given, called in /in/IW8q5 on line 9 and defined in /in/IW8q5 on line 4
Process exited with code 255.
Output for 5.3.28 - 5.3.29
array(0) { } Catchable fatal error: Argument 1 passed to bla() must be an array, null given, called in /in/XoEaL on line 9 and defined in /in/XoEaL on line 4
Process exited with code 255.
Output for 5.2.0 - 5.3.27
array(0) { } Catchable fatal error: Argument 1 passed to bla() must be an array, null given, called in /in/IW8q5 on line 9 and defined in /in/IW8q5 on line 4
Process exited with code 255.
Output for 5.1.0 - 5.1.6
array(0) { } Fatal error: Argument 1 passed to bla() must not be null, called in /in/IW8q5 on line 9 and defined in /in/IW8q5 on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /in/IW8q5 on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /in/IW8q5 on line 4
Process exited with code 255.
Output for 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_ARRAY, expecting ')' in /in/IW8q5 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/IW8q5 on line 4
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected T_ARRAY, expecting ')' in /in/XoEaL on line 4
Process exited with code 255.