3v4l.org

run code in 150+ 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,'-');
based on Yg7S5
Output for 5.0.4 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: string in /in/2Vnn9 on line 8 0
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: string in /in/2Vnn9 on line 8 0