3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = $arr2 = array("img12.png", "img10.png", "img2.png", "img1.png"); echo "Standard string comparison\n"; usort($arr1, "strcmp"); print_r($arr1); echo "\nNatural order string comparison\n"; usort($arr2, "strnatcmp"); print_r($arr2); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Standard string comparison Array ( [0] => img1.png [1] => img10.png [2] => img12.png [3] => img2.png ) Natural order string comparison Array ( [0] => img1.png [1] => img2.png [2] => img10.png [3] => img12.png )

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:
88.67 ms | 401 KiB | 8 Q