3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ [ "time" => 1494182396, "id" => "1" ], [ "time" => 1494182067, "id" => "2" ] ]; usort( $a, function( $a, $b ) { return $a["time"] <=> $b["time"]; } ); var_dump( ["aufsteigend" => $a] ); usort( $a, function( $a, $b ) { return ($a["time"] <=> $b["time"]) * -1; } ); var_dump( ["absteigend" => $a] );
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["aufsteigend"]=> array(2) { [0]=> array(2) { ["time"]=> int(1494182067) ["id"]=> string(1) "2" } [1]=> array(2) { ["time"]=> int(1494182396) ["id"]=> string(1) "1" } } } array(1) { ["absteigend"]=> array(2) { [0]=> array(2) { ["time"]=> int(1494182396) ["id"]=> string(1) "1" } [1]=> array(2) { ["time"]=> int(1494182067) ["id"]=> string(1) "2" } } }

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:
65.68 ms | 402 KiB | 8 Q