3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=" <b>test</b> <pre> <b>test</b> </pre> <b>test</b> "; echo preg_replace_callback(htmlspecialchars('~(?s)<pre>.*?</pre>~'), function($match) { return htmlspecialchars_decode($match[0]);}, preg_replace('~<(/?)b>~','[$1b]', preg_replace_callback('~(?s)<pre>.*?</pre>~', function($match) { return htmlspecialchars($match[0]);}, $str)));

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
166.78 ms | 2018 KiB | 14 Q