3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'start ** not bold ** and **bold** not bold **bold *** still bold** not bold **** not bold ****'; echo preg_replace('/(?<!\*)\*\*(?![\s*])(.*?)(?<![\s*])\*\*(?!\*)/', '<b>$1</b>', $string);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
150.64 ms | 2020 KiB | 9 Q