3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sortBy = array( 'foo' => 'some', 'bar' => 'not', 'wat' => 'important', 'baz' => 'stuff', ); $dataToSort = array( 'baz' => 'Baz stuff', 'bar' => 'Bar things', 'wat' => 'Simply wat', 'foo' => 'Foo yourself', ); var_dump(array_merge($sortBy, $dataToSort));
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(4) { ["foo"]=> string(12) "Foo yourself" ["bar"]=> string(10) "Bar things" ["wat"]=> string(10) "Simply wat" ["baz"]=> string(9) "Baz stuff" }
Output for hhvm-3.10.0

Process exited with code 153.