3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = []; $list[] = "TALB20170826D-\$A$$-RA11.pdf"; $list[] = "TAP$20170826D-\$A$$-RA11.pdf"; $list[] = "TASD20170826D-\$A$$-RA11.pdf"; $list[] = "TAUA20170826D-\$A$$-RA11.pdf"; $list[] = "TAUB20170826D-\$A$$-RA11.pdf"; $list[] = "TAUC20170826D-\$A$$-RA11.pdf"; $list[] = "TAUD20170826D-\$A$$-RA11.pdf"; $list[] = "TBTP20170826D-\$A$$-RA11.pdf"; $list[] = "TCBY20170826D-\$A$$-RA11.pdf"; $abbr = [ "TALB" => "ALBANY", "TAP" => "Asia Pacific", ]; foreach ($list as &$el) { $el = strtr($el, $abbr); } var_dump($list);

preferences:
25.57 ms | 405 KiB | 5 Q