3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( 1, 2, 3 ); for ($i = 0; $i <= 30;) { echo $i . ": "; echo count($array) % $i++ . "\n"; //echo $array[] . "\n"; }
based on jEb0A
Output for 7.0.0 - 7.2.0
0: Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/DU60E:9 Stack trace: #0 {main} thrown in /in/DU60E on line 9
Process exited with code 255.
Output for 5.3.19 - 5.6.28
0: Warning: Division by zero in /in/DU60E on line 9 1: 0 2: 1 3: 0 4: 3 5: 3 6: 3 7: 3 8: 3 9: 3 10: 3 11: 3 12: 3 13: 3 14: 3 15: 3 16: 3 17: 3 18: 3 19: 3 20: 3 21: 3 22: 3 23: 3 24: 3 25: 3 26: 3 27: 3 28: 3 29: 3 30: 3