3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = []; $arr["recently_viewed"] = ["priority" => 1, "no_of_products" =>1]; $arr["searched_based"] = ["priority" => 0, "no_of_products" =>4]; $arr["last_ordered_items"] = ["priority" => 3, "no_of_products" =>3]; $arr = array_filter($arr, function ($e) {return $e["priority"];}); uasort($arr, function($a, $b) { return $b['priority'] - $a['priority']; }); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [last_ordered_items] => Array ( [priority] => 3 [no_of_products] => 3 ) [recently_viewed] => Array ( [priority] => 1 [no_of_products] => 1 ) )

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:
26.42 ms | 406 KiB | 5 Q