3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $regex = '/(?<!<br>)(?<!\s)\s*(\((?:(?:(?!<br>|\(|\)).)*(?:\((?:(?!<br>|\(|\)).)*\))?)*?\))\s*(\{)/si'; $test_string = '(""L"",function(){})'; echo preg_replace($regex,' $1 $2',$test_string);
Output for 4.3.0 - 4.4.5, 4.4.9 - 5.1.6, 7.0.0 - 7.1.0
(""L"",function () {})
Output for 5.2.0 - 5.6.28
Output for 4.4.6 - 4.4.8
(""L"",function(){})