3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text="Welcome to PHP"; $searchchar="e"; $count="0"; //zero for($i="0"; $i<strlen($text); $i=$i+1){ if(substr($text,$i,1)==$searchchar){ $count=$count+1; } } echo $count
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/ZbKZh on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/ZbKZh on line 15
Process exited with code 255.