3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array['facebook'] = ["facebook_enabled" => 1, "facebook_url" => "https://www.facebook.com/", "facebook_order" => 7]; $array['twitter'] = ["twitter_enabled" => 1, "twitter_url" => "https://www.twitter.com/", "twitter_order" => 3]; usort($array, function($a, $b) { $a = array_values($a); $b = array_values($b); return $a[2] > $b[2]; }); print_r($array);
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/EQ2s3 on line 8 Array ( [0] => Array ( [twitter_enabled] => 1 [twitter_url] => https://www.twitter.com/ [twitter_order] => 3 ) [1] => Array ( [facebook_enabled] => 1 [facebook_url] => https://www.facebook.com/ [facebook_order] => 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:
138.54 ms | 406 KiB | 5 Q