3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = ['My Name ## is "#P_NAM3#" and \r\n', 'I am \'#P_AG2#\' years old `#abc#`']; //$r = '#(?P<name>.*?)#'; //$r = '#(\w*)#'; echo preg_replace_callback('/#([^#]*)#/m', 'trad', $text);

preferences:
45.62 ms | 402 KiB | 5 Q