3v4l.org

run code in 300+ PHP versions simultaneously
<?php $countries = [ ['id' => 1, 'text' => 'Burma'], ['id' => 2, 'text' => 'Zimbabwe'], ['id' => 3, 'text' => 'France'], ['id' => 4, 'text' => 'United States'], ['id' => 5, 'text' => 'Russia'], ]; usort( $countries, fn($a, $b) => [$a['text'] !== 'United States', $a['text']] <=> [$b['text'] !== 'United States', $b['text']] ); var_export($countries);
Output for git.master, rfc.property-hooks, git.master_jit
array ( 0 => array ( 'id' => 4, 'text' => 'United States', ), 1 => array ( 'id' => 1, 'text' => 'Burma', ), 2 => array ( 'id' => 3, 'text' => 'France', ), 3 => array ( 'id' => 5, 'text' => 'Russia', ), 4 => array ( 'id' => 2, 'text' => 'Zimbabwe', ), )

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:
47.01 ms | 1302 KiB | 4 Q