3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $vals = array('a', 'b', 'c', 'd', 'e', 'f'); $token = true; $i = 0; while($token) { $val = $vals[$i]; if ($val == 'a') { echo 'a'; } elseif ($val == 'b') { echo 'b'; } elseif ($val == 'c') { echo 'c'; } elseif ($val == 'd') { echo 'd'; } elseif ($val == 'e') { echo 'e'; } elseif ($val == 'f') { echo 'f'; } else { $token = false; } $i++; } exit;
based on c0rKd
Output for 5.3.0 - 7.1.0
abcdef Notice: Undefined offset: 6 in /in/3ZrRu on line 8
Output for 4.3.0 - 5.2.17
abcdef Notice: Undefined offset: 6 in /in/3ZrRu on line 8