3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = "the number of letters in mississippi = 12"; $i=-1; $cp = $input; while( !(ctype_digit($cp[$i++]) ) ) ; echo $i; echo $cp[$i],$cp[$i+1],"\n";
Output for 7.1.0 - 7.3.0rc4
0th
Output for 5.2.10 - 7.0.20
Notice: Uninitialized string offset: -1 in /in/QjJY9 on line 6 402 Notice: Uninitialized string offset: 41 in /in/QjJY9 on line 9
Output for 4.4.1 - 4.4.9, 5.1.0 - 5.2.9
Notice: Uninitialized string offset: -1 in /in/QjJY9 on line 6 402 Notice: Uninitialized string offset: 41 in /in/QjJY9 on line 9
Output for 4.3.0 - 4.4.0, 5.0.0 - 5.0.5
Notice: Uninitialized string offset: -1 in /in/QjJY9 on line 6 0th