3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 'hello, [how]. please don\'t remove [are] you?'; echo preg_replace('#\s*\[.+\]\s*#b', ' ', $a);
Output for 5.2.3 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace(): Unknown modifier 'b' in /in/4GtEd on line 4
Output for hhvm-3.10.0 - 3.12.0
Warning: Unknown modifier 'b': [#\s*\[.+\]\s*#b] in /in/4GtEd on line 4
Output for 4.4.3 - 5.2.2
<br /> <b>Warning</b>: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Unknown modifier 'b' in <b>/in/4GtEd</b> on line <b>4</b><br />
Output for 4.3.11 - 4.4.2
<br /> <b>Warning</b>: preg_replace(): Unknown modifier 'b' in <b>/in/4GtEd</b> on line <b>4</b><br />
Output for 4.3.0 - 4.3.10
<br /> <b>Warning</b>: Unknown modifier 'b' in <b>/in/4GtEd</b> on line <b>4</b><br />