3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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;
Output for 5.0.4 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
Notice: Undefined variable: newname in /in/Qphrv on line 6 folder: test oldname:/bild.jpg newname:
Output for hhvm-3.12.0
Notice: Undefined variable: newname in /in/Qphrv on line -1 folder: test oldname:/bild.jpg newname:
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: newname in /in/Qphrv on line 6 folder: test oldname:/bild.jpg newname: