3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = "He *is* a good boy. How *are* you."; $_GET['one'] = "doesn't"; $_GET['two'] = "think about"; preg_match_all( '{\*[^*]+\*}',$txt,$matches ); $txt = str_replace( $matches[0][0], $_GET['one'], $txt ); $txt = str_replace( $matches[0][1], $_GET['two'], $txt ); echo $txt;

preferences:
30.95 ms | 402 KiB | 5 Q