3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr[] = ['первый',10,'бла']; $arr[] = ['второй',5,'бла']; $arr[] = ['третий',11,'бла']; $sort = [5,11,10]; usort($arr, function($a, $b) use ($sort) { return array_search($a[1], $sort) - array_search($b[1], $sort); }); var_dump($arr);
Output for rfc.property-hooks, git.master, git.master_jit
array(3) { [0]=> array(3) { [0]=> string(12) "второй" [1]=> int(5) [2]=> string(6) "бла" } [1]=> array(3) { [0]=> string(12) "третий" [1]=> int(11) [2]=> string(6) "бла" } [2]=> array(3) { [0]=> string(12) "первый" [1]=> int(10) [2]=> string(6) "бла" } }

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:
43.3 ms | 2124 KiB | 4 Q