3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $filename= 'jhgjkhgjkgh.pdf'; # Filename am letzten Punkt auftrennen $pos = strrpos($filename, '.'); if ($pos === false) { $file_backup = $filename.date("Y-m-d-H-i-s"); }else{ $file_backup = substr($filename,0,$pos-1).date("Y-m-d-H-i-s").substr($filename,$pos); } echo $file_backup;
Output for 4.3.0 - 7.2.0
jhgjkhgjkg2013-05-08-07-45-31.pdf