3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string4="Featuring"; $pos="Featuring"; while(($pos = strpos($string, ',',$pos)) !== FALSE){ $count++; $pos++; // This ends } echo $count;
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: string in /in/29AIt on line 4 Warning: strpos() expects parameter 3 to be integer, string given in /in/29AIt on line 4 Notice: Undefined variable: count in /in/29AIt on line 5 Notice: Undefined variable: string in /in/29AIt on line 4 Warning: strpos(): Offset not contained in string in /in/29AIt on line 4 1
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: string in /in/29AIt on line 4 Warning: strpos() expects parameter 3 to be integer, string given in /in/29AIt on line 4 Notice: Undefined variable: count in /in/29AIt on line 5 Notice: Undefined variable: string in /in/29AIt on line 4 Warning: Offset not contained in string in /in/29AIt on line 4 1
Output for 5.3.0 - 5.6.28
Notice: Undefined variable: string in /in/29AIt on line 4 Warning: strpos() expects parameter 3 to be long, string given in /in/29AIt on line 4 Notice: Undefined variable: count in /in/29AIt on line 5 Notice: Undefined variable: string in /in/29AIt on line 4 Warning: strpos(): Offset not contained in string in /in/29AIt on line 4 1
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: string in /in/29AIt on line 4 Notice: Undefined variable: count in /in/29AIt on line 9
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: string in /in/29AIt on line 4 Notice: Undefined variable: count in /in/29AIt on line 9