3v4l.org

run code in 300+ PHP versions simultaneously
<?php $photos = [ 'photo-Bname_0333.jpg', 'photo-Bname_0222.jpg', 'photo-Aname_0333.jpg', 'photo-Cname_0111.jpg', 'photo-Cname_0222.jpg', 'photo-Aname_0112.jpg', ]; usort($photos, function ($a, $b) { return array_reverse(explode('_', $a, 2)) <=> array_reverse(explode('_', $b, 2)); }); var_export($photos);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'photo-Cname_0111.jpg', 1 => 'photo-Aname_0112.jpg', 2 => 'photo-Bname_0222.jpg', 3 => 'photo-Cname_0222.jpg', 4 => 'photo-Aname_0333.jpg', 5 => 'photo-Bname_0333.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:
27.26 ms | 405 KiB | 5 Q