3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { @$value = 1 / 0; } catch (DivisionByZeroError $e) { echo $e->getMessage(), "\n"; } var_dump($value); try { @$value = intdiv(1,0); } catch (DivisionByZeroError $e) { echo $e->getMessage(), "\n"; } var_dump($value); var_dump(intdiv(6,0));
based on pIpTh
Output for 7.0.0 - 7.2.0
float(INF) Division by zero float(INF) Fatal error: Uncaught DivisionByZeroError: Division by zero in /in/XUKJb:17 Stack trace: #0 /in/XUKJb(17): intdiv(6, 0) #1 {main} thrown in /in/XUKJb on line 17
Process exited with code 255.
Output for 5.3.18 - 5.6.28
bool(false)
Process exited with code 255.