3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = strrpos('test/bild.jpg','/'); $x = $x? $x++ : ''; $folder = substr('test/bild.jpg',0,$x); $oldname = substr('test/bild.jpg',$x); echo 'folder: '.$folder.' oldname:'.$oldname.' newname: '.$newname;

preferences:
31.92 ms | 402 KiB | 5 Q