3v4l.org

run code in 300+ PHP versions simultaneously
<?php $orig = "asdfasdf.thumbnail.JPG"; $orig2 = "abcdef.JPG"; $goal = "asdfasdf.JPG"; $new = preg_replace("/\.thumbnail\.JPG/",".JPG",$orig2); echo $new . PHP_EOL . $goal;

preferences:
38.01 ms | 402 KiB | 5 Q