3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = ['o' => 'vote', 'u' => 'true']; $arr2 = ['p' => '', 'v' => 'digit']; $merged = array_merge($arr1, $arr2); usort($merged, function($v1, $v2){ if($v1 !== false && empty($v1)){ return 1; }elseif($v2 !== false && empty($v2)){ return -1; }else{ return 0; } }); echo '<pre>'; print_r($merged); ?>
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [0] => vote [1] => true [2] => digit [3] => )

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:
54 ms | 1460 KiB | 4 Q