3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump((int)NAN); var_dump((int)INF); var_dump((int)-INF); var_dump((int)(1 / -INF));
Output for 7.0.0 - 7.2.0
int(0) int(0) int(0) int(0)
Output for 5.5.24 - 5.6.28
int(-9223372036854775808) int(-9223372036854775808) int(-9223372036854775808) int(0)
Output for 4.3.6 - 5.0.1, 5.0.3 - 5.4.45
int(-9223372036854775808) int(0) int(-9223372036854775808) int(0)
Output for 5.0.2
int(-9223372036854775808) int(9223372036854775807) int(-9223372036854775808) int(0)
Output for 4.3.0 - 4.3.5
Notice: Use of undefined constant NAN - assumed 'NAN' in /in/3ihLN on line 3 int(0) Notice: Use of undefined constant INF - assumed 'INF' in /in/3ihLN on line 4 int(0) Notice: Use of undefined constant INF - assumed 'INF' in /in/3ihLN on line 5 int(0) Notice: Use of undefined constant INF - assumed 'INF' in /in/3ihLN on line 6 Warning: Division by zero in /in/3ihLN on line 6 int(0)