3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a['a'] = 1; $b = [2,3]; $a['a'] = array_merge($a['a'], $b); vat_dump($a['a']);
based on 4ZKQo
Output for 7.3.0rc3
Warning: array_merge(): Expected parameter 1 to be an array, int given in /in/KCpnj on line 6 Fatal error: Uncaught Error: Call to undefined function vat_dump() in /in/KCpnj:7 Stack trace: #0 {main} thrown in /in/KCpnj on line 7
Process exited with code 255.
Output for 7.0.0 - 7.3.0beta1
Warning: array_merge(): Argument #1 is not an array in /in/KCpnj on line 6 Fatal error: Uncaught Error: Call to undefined function vat_dump() in /in/KCpnj:7 Stack trace: #0 {main} thrown in /in/KCpnj on line 7
Process exited with code 255.
Output for hhvm-3.22.0
Warning: Invalid operand type was used: array_merge expects array(s) or collection(s) in /in/KCpnj on line -1 Fatal error: Uncaught Error: Call to undefined function vat_dump() in /in/KCpnj:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.21.3
Warning: Invalid operand type was used: array_merge expects array(s) or collection(s) in /in/KCpnj on line 6 Fatal error: Uncaught Error: Call to undefined function vat_dump() in /in/KCpnj:7 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5
Warning: Invalid operand type was used: expects array(s) or collection(s) in /in/KCpnj on line 6 Fatal error: Uncaught Error: Call to undefined function vat_dump() in /in/KCpnj:7 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Warning: array_merge(): Argument #1 is not an array in /in/KCpnj on line 6 Fatal error: Call to undefined function vat_dump() in /in/KCpnj on line 7
Process exited with code 255.