3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = "Hello {username}"; str_replace('{username}', 'David', $tmp); echo $tmp;

preferences:
60.49 ms | 402 KiB | 5 Q