3v4l.org

run code in 300+ PHP versions simultaneously
<?php $SYMB = "[This was filled in]"; $body = "Hello world \$SYMB $SYMB testing foo"; $body = preg_replace('/\$([A-Z]{1,6})/', '\\1', $body); print $body;

preferences:
40.57 ms | 402 KiB | 5 Q