3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $reg = "/<script>.*?<\/script>/is"; $str = "<script>".str_repeat('1',100000)."</script>"; //长度大于100014 var_dump(preg_replace($reg, $str)); //返回NULL
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Warning: preg_replace() expects at least 3 parameters, 2 given in /in/QHgKW on line 5 NULL
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.2.17
Warning: Wrong parameter count for preg_replace() in /in/QHgKW on line 5 NULL
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/QHgKW on line 5
Process exited with code 255.