3v4l.org

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

preferences:
23.65 ms | 404 KiB | 5 Q