3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a =array('1,2,6'); $b =array('2,3,1'); $a = explode(',',$a); $b = explode(',',$b); var_dump($a); var_dump($b); var_dump(array_combine($a,$b));
Output for 5.3.1 - 5.6.28, 7.0.0 - 7.1.0
Warning: explode() expects parameter 2 to be string, array given in /in/2tKLW on line 5 Warning: explode() expects parameter 2 to be string, array given in /in/2tKLW on line 6 NULL NULL Warning: array_combine() expects parameter 1 to be array, null given in /in/2tKLW on line 11 NULL
Output for hhvm-3.10.0 - 3.12.0
Warning: explode() expects parameter 2 to be string, array given in /in/2tKLW on line 5 Warning: explode() expects parameter 2 to be string, array given in /in/2tKLW on line 6 NULL NULL Warning: Invalid operand type was used: array_combine expects arrays or collections in /in/2tKLW on line 11 NULL
Output for 5.0.0 - 5.3.0
Notice: Array to string conversion in /in/2tKLW on line 5 Notice: Array to string conversion in /in/2tKLW on line 6 array(1) { [0]=> string(5) "Array" } array(1) { [0]=> string(5) "Array" } array(1) { ["Array"]=> string(5) "Array" }
Output for 4.4.5 - 4.4.9
Notice: Array to string conversion in /in/2tKLW on line 5 Notice: Array to string conversion in /in/2tKLW on line 6 array(1) { [0]=> string(5) "Array" } array(1) { [0]=> string(5) "Array" } Fatal error: Call to undefined function: array_combine() in /in/2tKLW on line 11
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Array to string conversion in /in/2tKLW on line 5 Notice: Array to string conversion in /in/2tKLW on line 6 array(1) { [0]=> string(5) "Array" } array(1) { [0]=> string(5) "Array" } Fatal error: Call to undefined function: array_combine() in /in/2tKLW on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Array to string conversion in /in/2tKLW on line 5 Notice: Array to string conversion in /in/2tKLW on line 6 array(1) { [0]=> string(5) "Array" } array(1) { [0]=> string(5) "Array" } Fatal error: Call to undefined function: array_combine() in /in/2tKLW on line 11