3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ['0' => ['part_img_url' => '354.test'],'1' => ['part_img_url' => '647.test']]; $names = array_map(function($p) { return $p['part_img_url'] = preg_replace("~\d+~", $p['element_id'], $p['part_img_url']); }, (array)$data); print_r($names);

preferences:
52.6 ms | 402 KiB | 5 Q