3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strOne = "Programming requires life long learning #learning #stackoverflow #programming"; $strTwo = "\n\n"; echo preg_replace('/ \K(?=#\w)/', $strTwo, $strOne, 1);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.81 ms | 1729 KiB | 9 Q