3v4l.org

run code in 150+ 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
0th
Output for 5.2.10 - 5.6.28, hhvm-3.13.2, 7.0.0 - 7.0.14
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 hhvm-3.10.0 - 3.12.0
402
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