3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = '[CODE]&lt;td align=&quot;$stylevar[right]&quot;&gt;[/CODE]'; $result = preg_replace('#\[(right)\](((?R)|[^[]+?|\[)*)\[/\\1\]#siU', '', $text); var_dump($text); var_dump($result);
Output for 4.3.0 - 5.1.6, 5.3.7 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(58) "[CODE]&lt;td align=&quot;$stylevar[right]&quot;&gt;[/CODE]" string(58) "[CODE]&lt;td align=&quot;$stylevar[right]&quot;&gt;[/CODE]"
Output for 5.2.0 - 5.3.6
string(58) "[CODE]&lt;td align=&quot;$stylevar[right]&quot;&gt;[/CODE]" NULL