3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fp = fopen(__FILE__, "r"); $a = array($fp => 'resource'); var_dump($a); var_dump(array_combine($a, $a));
Output for 5.4.0 - 7.2.0
Warning: Illegal offset type in /in/DJLgd on line 3 array(0) { } array(0) { }
Output for 5.2.3 - 5.3.29
Warning: Illegal offset type in /in/DJLgd on line 3 array(0) { } Warning: array_combine(): Both parameters should have at least 1 element in /in/DJLgd on line 5 bool(false)
Output for 5.0.4 - 5.2.2
<br /> <b>Warning</b>: Illegal offset type in <b>/in/DJLgd</b> on line <b>3</b><br /> array(0) { } <br /> <b>Warning</b>: array_combine() [<a href='function.array-combine'>function.array-combine</a>]: Both parameters should have at least 1 element in <b>/in/DJLgd</b> on line <b>5</b><br /> bool(false)
Output for 5.0.0 - 5.0.3
<br /> <b>Warning</b>: Illegal offset type in <b>/in/DJLgd</b> on line <b>3</b><br /> array(0) { } <br /> <b>Warning</b>: array_combine() [<a href='function.array-combine'>function.array-combine</a>]: Both parameters should have number of elements at least 0 in <b>/in/DJLgd</b> on line <b>5</b><br /> bool(false)
Output for 4.4.5 - 4.4.9
<br /> <b>Warning</b>: Illegal offset type in <b>/in/DJLgd</b> on line <b>3</b><br /> array(0) { } <br /> <b>Fatal error</b>: Call to undefined function: array_combine() in <b>/in/DJLgd</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.9 - 4.4.4
<br /> <b>Warning</b>: Illegal offset type in <b>/in/DJLgd</b> on line <b>3</b><br /> array(0) { } <br /> <b>Fatal error</b>: Call to undefined function: array_combine() in <b>/in/DJLgd</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.8
array(0) { } <br /> <b>Fatal error</b>: Call to undefined function: array_combine() in <b>/in/DJLgd</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
array(0) { } <br /> <b>Fatal error</b>: Call to undefined function: array_combine() in <b>/in/DJLgd</b> on line <b>5</b><br />