3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = "-Lorem Ipsum"; // 1 //$string = "--Lorem Ipsum"; // 2 //$string = "---Lorem Ipsum"; // 3 //$string = "--Lorem-Ipsum"; // 2 echo substr_count($string, '-'); // 3
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.3.0beta1
1
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/e2EKf on line 8
Process exited with code 255.