3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => 'DR-876-000-3.jpg', 1 => 'DR-876-000-2.jpg', 2 => 'DR-876-000-1.jpg', 3 => 'DR-876-000.png', 4 => 'DR-876-000.jpg', 5 => 'DR-876-000-4.jpg', ]; usort ( $arr , function ($a, $b) { return strnatcmp(pathinfo($a, PATHINFO_FILENAME), pathinfo($b, PATHINFO_FILENAME)); }); var_dump($arr);
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { [0]=> string(14) "DR-876-000.png" [1]=> string(14) "DR-876-000.jpg" [2]=> string(16) "DR-876-000-1.jpg" [3]=> string(16) "DR-876-000-2.jpg" [4]=> string(16) "DR-876-000-3.jpg" [5]=> string(16) "DR-876-000-4.jpg" }

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