3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( array('id' => 1, 'price' => 100), array('id' => 7, 'price' => 100.3), array('id' => 5, 'price' => 100.2), ); uasort($data, function ($a, $b) { return $a['price'] - $b['price']; }); var_dump($data); uasort($data, function ($a, $b) { return $a['price'] <=> $b['price']; }); var_dump($data);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(2) { ["id"]=> int(1) ["price"]=> int(100) } [1]=> array(2) { ["id"]=> int(7) ["price"]=> float(100.3) } [2]=> array(2) { ["id"]=> int(5) ["price"]=> float(100.2) } } array(3) { [0]=> array(2) { ["id"]=> int(1) ["price"]=> int(100) } [2]=> array(2) { ["id"]=> int(5) ["price"]=> float(100.2) } [1]=> array(2) { ["id"]=> int(7) ["price"]=> float(100.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:
69.17 ms | 402 KiB | 8 Q