3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array('id' => 1, 'version' => '1.3'), array('id' => 2, 'version' => '1.3.1'), array('id' => 3, 'version' => '1.3.2'), array('id' => 4, 'version' => '1.3.2-RC1'), array('id' => 5, 'version' => '1.3.2-RC2'), ); usort($arr, function($a,$b) { return -1 * version_compare ( $a['version'] , $b['version'] ); }); var_dump($arr);
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { [0]=> array(2) { ["id"]=> int(3) ["version"]=> string(5) "1.3.2" } [1]=> array(2) { ["id"]=> int(5) ["version"]=> string(9) "1.3.2-RC2" } [2]=> array(2) { ["id"]=> int(4) ["version"]=> string(9) "1.3.2-RC1" } [3]=> array(2) { ["id"]=> int(2) ["version"]=> string(5) "1.3.1" } [4]=> array(2) { ["id"]=> int(1) ["version"]=> string(3) "1.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:
36.31 ms | 406 KiB | 5 Q