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);
based on 1mtU7
Output for 7.0.0 - 7.2.0
float(INF) Division by zero float(INF)
Output for 5.3.18 - 5.6.28
bool(false)
Process exited with code 255.