3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text_string = '+TEST+'; $text = explode("+", $text_string); $text = $text[1]; $replaced_text = str_replace("+$text+", "<em>$text</em>", $text_string); echo $replaced_text; // output: <em>TEST</em> ?>

preferences:
29.12 ms | 402 KiB | 5 Q