3v4l.org

run code in 300+ PHP versions simultaneously
<?php $full_text = "[b]This is a test[/b] :) :D It's a boring test."; $body = $full_text; $body = nl2br($body); $body = str_replace( array(':)', ':D', '[b]', '[/b]'), array('Emoticon Smile', 'Emoticon colon D', '<b>', '</b>'), $body ); echo $body;

preferences:
29.45 ms | 402 KiB | 5 Q