3v4l.org

run code in 300+ PHP versions simultaneously
<?php $photos = 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', ); array_multisort( array_map(fn($v) => strstr($v, '_'), $photos), $photos ); var_export($photos);
Output for git.master_jit, git.master
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:
63.81 ms | 405 KiB | 5 Q