3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = array('test', '3', 'google.com'); $bar = array('title', 'rating', 'url', 'appropriate', 'seen'); if (count($foo) < count($bar)) { $foo = array_pad($foo, count($bar), ''); } $foobar = array_combine($bar, $foo); var_dump($foobar);
based on nr97k
Output for 5.0.0 - 7.2.0
array(5) { ["title"]=> string(4) "test" ["rating"]=> string(1) "3" ["url"]=> string(10) "google.com" ["appropriate"]=> string(0) "" ["seen"]=> string(0) "" }
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_combine() in /in/LFYou on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_combine() in /in/LFYou on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_combine() in /in/LFYou on line 9