3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [27, 38, 58, 82]; usort( $data, function ($a, $b) { echo "Comparing $a - $b", PHP_EOL; echo 'Element A (', $a ,') should go ', (($a - $b < 0) ? 'before' : 'after'), ' element B (', $b, ')', PHP_EOL; return $b - $a; } );
Output for git.master, git.master_jit, rfc.property-hooks
Comparing 27 - 38 Element A (27) should go before element B (38) Comparing 58 - 38 Element A (58) should go after element B (38) Comparing 27 - 82 Element A (27) should go before element B (82) Comparing 38 - 82 Element A (38) should go before element B (82) Comparing 58 - 82 Element A (58) should go before element B (82)

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