3v4l.org

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

preferences:
26.57 ms | 404 KiB | 5 Q