3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'test test test test'; echo preg_replace("/\w+\K/", '*', $string);

preferences:
45.56 ms | 1101 KiB | 5 Q