3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array('0' => 'John', '1' => 'George', '2' => 'James', '3' => 'Harry'); $arr2 = array('0' => '12', '1' => '8', '2' => '34', '3' => '23'); arsort($arr2); var_dump(array_replace($arr2,$arr1));
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [2]=> string(5) "James" [3]=> string(5) "Harry" [0]=> string(4) "John" [1]=> string(6) "George" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
28.36 ms | 405 KiB | 5 Q