3v4l.org

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

preferences:
82.85 ms | 1101 KiB | 5 Q