3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! $data = array('d' => 'f'); $a = 0; $b = 1; $c = 'e'; var_dump(array_merge($data, compact('a', 'b', 'c')));
Output for 4.3.0 - 7.1.10
array(4) { ["d"]=> string(1) "f" ["a"]=> int(0) ["b"]=> int(1) ["c"]=> string(1) "e" }