3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ini_set("display_errors, "On"); $regex = '(((?!a).)*)*a\\{'; $test_string = 'AAAAAAAAAAAAAA{AA'; echo "1:".mb_ereg_replace($regex,'WORKED',$test_string)."\n"; echo "2:".preg_replace('/'.$regex.'/u','WORKED',$test_string)."\n"; echo "3:".preg_replace('/'.$regex.'/','WORKED',$test_string)."\n";
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected 'On' (T_STRING) in /in/lLVmp on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/lLVmp on line 2
Process exited with code 255.