3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Some parsing goes on here, ending up with following variables $hRowCount = 0; $vRowCount = 8; $resultId = 3; $output = "Given result ID => " . $resultId; $output .= "\n\nVertical question => " . (int) ($resultId / $hRowCount); $output .= "\nHorizontal question => " . $resultId % $hRowCount; echo $output;
based on 0MYSA
Output for 7.0.0 - 7.2.0
Warning: Division by zero in /in/KBeqG on line 9 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/KBeqG:10 Stack trace: #0 {main} thrown in /in/KBeqG on line 10
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Warning: Division by zero in /in/KBeqG on line 9 Warning: Division by zero in /in/KBeqG on line 10 Given result ID => 3 Vertical question => 0 Horizontal question =>