3v4l.org

run code in 150+ 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).date("Y-m-d-H-i-s").substr($filename,$pos); } echo $file_backup;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
jhgjkhgjkgh2013-05-08-07-45-50.pdf