3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'abcde'; for($i=0, $c=strlen($str); $i<$c; $i++) { echo $i . ' => ' . ord($str[$i]) . PHP_EOL; }
based on 0V0Al
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
0 => 97 1 => 98 2 => 99 3 => 100 4 => 101
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/p8h13 on line 7 0 => 97PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/p8h13 on line 7 1 => 98PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/p8h13 on line 7 2 => 99PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/p8h13 on line 7 3 => 100PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/p8h13 on line 7 4 => 101PHP_EOL