3v4l.org

run code in 300+ PHP versions simultaneously
<?php $alternatives = array( 'foo' => 0, 'foo1' => 0, 'foo3' => 0, ); echo 'before sorting:'.PHP_EOL; print_r($alternatives); asort($alternatives, SORT_STRING); echo 'after sorting:'.PHP_EOL; print_r($alternatives); $keys = array_keys($alternatives); print_r($keys); sort($keys); print_r($keys); sort($keys, SORT_STRING); print_r($keys); sort($keys, SORT_NATURAL); print_r($keys);
Output for git.master, git.master_jit, rfc.property-hooks
before sorting: Array ( [foo] => 0 [foo1] => 0 [foo3] => 0 ) after sorting: Array ( [foo] => 0 [foo1] => 0 [foo3] => 0 ) Array ( [0] => foo [1] => foo1 [2] => foo3 ) Array ( [0] => foo [1] => foo1 [2] => foo3 ) Array ( [0] => foo [1] => foo1 [2] => foo3 ) Array ( [0] => foo [1] => foo1 [2] => foo3 )

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