3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'I have *something* for you'; $nota="something"; echo preg_replace("/\*($nota)\*/i", "<span style=\"background:#FFFF00;\">$1</span>", $text );

preferences:
51.5 ms | 1492 KiB | 5 Q