3v4l.org

run code in 300+ PHP versions simultaneously
<?php $target = "abcwa"; echo preg_replace('/./', 'w:$0', $target); echo "\n"; echo preg_replace('/(?=.)/', 'w:', $target);

preferences:
33.42 ms | 404 KiB | 5 Q