3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function gcd($n,$m){ while($n!=0){ $temp = $n%$m; $n = $m; $m = $temp; } return $n; } echo gcd(6,8);
based on OCvgj
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/kQ5k0:5 Stack trace: #0 /in/kQ5k0(12): gcd(2, 0) #1 {main} thrown in /in/kQ5k0 on line 5
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Warning: Division by zero in /in/kQ5k0 on line 5 0