Level 41
it's ok, you could inline it like this
$parameters['body'] = str_replace(['<pre>', '</pre>'], ['<pre><code>', '</code></pre>'], $parameters['body']);
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, is it ok to use this? Or maybe there is a better solution?
$parameters['body'] = str_replace('<pre>', '<pre><code>', $parameters['body']);
$parameters['body'] = str_replace('</pre>', '</pre></code>', $parameters['body']);
Please or to participate in this conversation.