3v4l.org

run code in 300+ PHP versions simultaneously
<?php $espn_ar["pid_6254"] = "2977742"; $espn_ar["pid_8269"] = "9614"; foreach ($espn_ar as $key => $value) { $imageName = sprintf('images/mfl_%s.png', str_replace('pid_', '', $key)); echo $imageName, PHP_EOL; }
Output for 7.4.0 - 7.4.30, 8.0.1 - 8.0.22, 8.1.0 - 8.1.9
images/mfl_6254.png images/mfl_8269.png

preferences:
32.86 ms | 409 KiB | 5 Q