3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ ['company' => 'A', 'weight' => 4.6], ['company' => 'B', 'weight' => 1.7], ['company' => 'C', 'weight' => 3.7], ['company' => 'D', 'weight' => 13.2], ['company' => 'E', 'weight' => 1.85], ['company' => 'F', 'weight' => 2.07], ]; usort($arr, fn($a, $b) => $b['weight'] <=> $a['weight']); var_export($arr);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'company' => 'D', 'weight' => 13.2, ), 1 => array ( 'company' => 'A', 'weight' => 4.6, ), 2 => array ( 'company' => 'C', 'weight' => 3.7, ), 3 => array ( 'company' => 'F', 'weight' => 2.07, ), 4 => array ( 'company' => 'E', 'weight' => 1.85, ), 5 => array ( 'company' => 'B', 'weight' => 1.7, ), )

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