3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "opening-ceremony-600x450.d20140220-u162540.jpg'"; $removeTimestamp = strlen($string); $string = substr_replace($stringToReplace, ".jpg", 0, $removeTimestamp); echo $string;
Output for 5.0.4 - 5.2.1, 5.2.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: stringToReplace in /in/5bR4f on line 4 .jpg
Output for 5.2.2 - 5.2.3
Notice: Undefined variable: stringToReplace in /in/5bR4f on line 4
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: stringToReplace in /in/5bR4f on line 4 .jpg