3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for ($i = 0; $i < 10; $i += 1) { echo sprintf("Array element %d. Value contained is %d", $i, $arr[$i]); } ?>
based on 7QkRZ
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 0. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 1. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 2. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 3. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 4. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 5. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 6. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 7. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 8. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 9. Value contained is 0
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 0. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 1. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 2. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 3. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 4. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 5. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 6. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 7. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 8. Value contained is 0 Notice: Undefined variable: arr in /in/kF4vc on line 3 Array element 9. Value contained is 0