3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attachments = [ [ "year" => 2018, "id" => 14689 ], [ "year" => 2017, "id" => 14690 ], [ "year" => 2018, "id" => 14688 ], [ "year" => 2018, "id" => 14687 ] ]; usort($attachments, function ($first, $second) { return $first["year"] < $second["year"]; }); print_r($attachments);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /in/cLGm6 on line 21 Array ( [0] => Array ( [year] => 2018 [id] => 14689 ) [1] => Array ( [year] => 2018 [id] => 14688 ) [2] => Array ( [year] => 2018 [id] => 14687 ) [3] => Array ( [year] => 2017 [id] => 14690 ) )

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:
34.63 ms | 407 KiB | 5 Q