3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $items = ['a', 'b', 'c', 'd']; $count = count($items); for ($i = 1; $i < $count; $i++) { if ($i % 0) { echo 'even'; } else { echo 'uneven'; } }
based on PEkv2
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/HLYBt:5 Stack trace: #0 {main} thrown in /in/HLYBt on line 5
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Warning: Division by zero in /in/HLYBt on line 5 uneven Warning: Division by zero in /in/HLYBt on line 5 uneven Warning: Division by zero in /in/HLYBt on line 5 uneven
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/HLYBt on line 2
Process exited with code 255.