3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $stringToReplace = "opening-ceremony-600x450.d20140220-u162540.jpg'"; $removeTimestamp = strlen($stringToReplace); $removeTimestamp = $removeTimestamp - 22; $string = substr_replace($stringToReplace, ".jpg", $removeTimestamp,$removeTimestamp); echo $string;
Output for 4.3.0 - 7.2.0
opening-ceremony-600x450..jpg