3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php do{ $a = mt_rand(5, 75); $b = mt_rand(5, 75); $adjuster = mt_rand(2, 20); $decimal_selector = mt_rand(1, 6); if ($decimal_selector == 1){ $a = $a / 10; $b = $b / 10; } if ($decimal_selector == 2){ $a = $a / 10; $b = $b / 100; } if ($decimal_selector == 3){ $a = $a / 100; $b = $b / 10; } if ($decimal_selector == 4){ $a = $a / 100; $b = $b / 100; } if ($decimal_selector == 5){ $a = $a / 1000; $b = $b / 1000; } if ($decimal_selector == 6){ $a = $a / 1000; $b = $b / 100; } if($b < $a){ $b = $b + ($a - $b) + $adjuster; } $c = $b - $a; if(intval($c) == $c) { $c_is_int = 1; echo "c $c is int\n"; } else { $c_is_int = 0; echo "c $c is NOT int\n"; } } while($c_is_int == 1);
Output for 7.1.0
c 0.426 is NOT int
Output for 4.4.7, 5.6.17, 7.0.14
c 0.1 is NOT int
Output for 7.0.6
c 5 is int c 7 is int c 7 is int c 12 is int c 0.066 is NOT int
Output for 4.4.1, 7.0.5
c 0.08 is NOT int
Output for 7.0.4
c 2.53 is NOT int
Output for 7.0.3
c 0.17 is NOT int
Output for 5.1.2, 5.4.38, 7.0.2
c 12 is NOT int
Output for 7.0.1
c 12 is int c 18 is int c 0.05 is NOT int
Output for 7.0.0
c 0.683 is NOT int
Output for hhvm-3.12.0
c 0.044 is NOT int
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
c 17 is int c 17 is int c 7 is NOT int
Output for 5.6.21
c 0.013 is NOT int
Output for 5.2.0, 5.2.10, 5.6.20
c 0.9 is NOT int
Output for 5.6.19
c 3.24 is NOT int
Output for 5.6.18
c 0.422 is NOT int
Output for 5.6.16
c 4.89 is NOT int
Output for 5.6.15
c 0.692 is NOT int
Output for 5.6.14
c 0.8 is NOT int
Output for 5.6.13
c 4.91 is NOT int
Output for 5.2.6, 5.6.12
c 0.01 is NOT int
Output for 5.6.11
c 15 is NOT int
Output for 5.6.10
c 2 is int c 14 is int c 0.231 is NOT int
Output for 5.6.9
c 15 is int c 8 is NOT int
Output for 5.4.42, 5.6.8
c 0.025 is NOT int
Output for 5.6.7
c 3.6 is NOT int
Output for 5.5.35
c 4 is NOT int
Output for 5.5.34
c 4.3 is NOT int
Output for 5.5.33
c 0.606 is NOT int
Output for 5.5.32
c 2 is int c 0.26 is NOT int
Output for 5.5.31
c 0.003 is NOT int
Output for 5.5.30
c 4 is int c 0.265 is NOT int
Output for 5.3.15, 5.5.29
c 0.033 is NOT int
Output for 5.5.28
c 0.041 is NOT int
Output for 5.5.27
c 1.68 is NOT int
Output for 5.5.26
c 10 is int c 0.329 is NOT int
Output for 5.5.25
c 0 is int c 10 is int c 13 is int c 0.18 is NOT int
Output for 5.5.24
c 0.51 is NOT int
Output for 5.4.45
c 14 is int c 0.628 is NOT int
Output for 5.4.44
c 0.34 is NOT int
Output for 5.2.2, 5.4.43
c 6 is NOT int
Output for 5.4.41
c 0.615 is NOT int
Output for 5.4.40
c 5.27 is NOT int
Output for 5.4.39
c 4.5 is NOT int
Output for 5.4.37
c 20 is int c 6.71 is NOT int
Output for 5.4.36
c 5.59 is NOT int
Output for 5.4.35
c 0.024 is NOT int
Output for 5.4.34
c 2.07 is NOT int
Output for 5.4.32
c 16 is int c 1 is NOT int
Output for 5.4.31
c 20 is int c 0.034 is NOT int
Output for 5.4.30
c 0.113 is NOT int
Output for 5.4.29
c 17 is int c 8 is int c 2 is int c 15 is int c 3.32 is NOT int
Output for 5.4.28
c 0.299 is NOT int
Output for 5.4.27
c 3 is int c 0.491 is NOT int
Output for 5.4.26
c 15 is int c 1.7 is NOT int
Output for 5.4.25
c 7 is int c 0.125 is NOT int
Output for 5.4.24
c 0.03 is NOT int
Output for 5.4.23
c 7.37 is NOT int
Output for 5.4.22
c 10 is int c 0.499 is NOT int
Output for 5.2.9, 5.4.21
c 17 is int c 4.7 is NOT int
Output for 5.4.20
c 13 is int c 6.56 is NOT int
Output for 5.4.13, 5.4.19
c 0.18 is NOT int
Output for 5.4.18
c 4.8 is NOT int
Output for 5.4.17
c 0.6 is NOT int
Output for 5.4.16
c 15 is int c 8 is int c 3.3 is NOT int
Output for 5.4.15
c 19 is int c 12 is int c 2 is NOT int
Output for 5.4.14
c 0.07 is NOT int
Output for 5.4.12
c 19 is int c 5 is int c 0.047 is NOT int
Output for 5.3.16, 5.4.11
c 5.89 is NOT int
Output for 5.4.10
c 5 is int c 0.004 is NOT int
Output for 5.4.9
c 8 is int c 0.338 is NOT int
Output for 5.4.8
c 16 is int c 3.26 is NOT int
Output for 5.4.7
c 1.5 is NOT int
Output for 5.4.6
c 14 is int c 5 is int c 0.31 is NOT int
Output for 5.4.5
c 4 is int c 0.9 is NOT int
Output for 5.2.8, 5.4.4
c 0.19 is NOT int
Output for 5.4.3
c 0.571 is NOT int
Output for 5.4.2
c 2 is int c 1.4 is NOT int
Output for 5.4.1
c 0.16 is NOT int
Output for 5.4.0
c 17 is int c 0.053 is NOT int
Output for 5.3.29
c 8 is int c 6.65 is NOT int
Output for 5.3.28
c 2.94 is NOT int
Output for 5.3.27
c 0.219 is NOT int
Output for 5.3.26
c 0.703 is NOT int
Output for 5.3.25
c 15 is int c 0.377 is NOT int
Output for 5.3.24
c 0.244 is NOT int
Output for 5.3.23
c 7.04 is NOT int
Output for 5.3.22
c 0.225 is NOT int
Output for 5.3.21
c 0.305 is NOT int
Output for 5.3.20
c 0.038 is NOT int
Output for 5.3.19
c 16 is int c 0.014 is NOT int
Output for 5.3.18
c 0.57 is NOT int
Output for 5.3.17
c 4 is int c 6 is int c 0.598 is NOT int
Output for 5.3.14
c 13 is int c 4 is int c 3 is NOT int
Output for 4.4.3, 5.3.13
c 0.05 is NOT int
Output for 5.3.12
c 0.165 is NOT int
Output for 5.3.11
c 2 is int c 0.235 is NOT int
Output for 5.3.10
c 0.559 is NOT int
Output for 5.3.9
c 5.15 is NOT int
Output for 5.3.8
c 3 is int c 0.14 is NOT int
Output for 5.3.7
c 0.7 is NOT int
Output for 5.3.6
c 16 is int c 15 is int c 0.051 is NOT int
Output for 5.3.5
c 2 is NOT int
Output for 5.3.4
c 0.55 is NOT int
Output for 5.3.3
c 9 is int c 3 is int c 0.456 is NOT int
Output for 5.3.2
c 3 is int c 9 is int c 3.8 is NOT int
Output for 5.3.1
c 10 is int c 4.3 is NOT int
Output for 5.3.0
c 2.15 is NOT int
Output for 5.2.17
c 0.654 is NOT int
Output for 5.2.16
c 6 is int c 20 is int c 4 is NOT int
Output for 5.2.15
c 0.446 is NOT int
Output for 5.2.14
c 1.17 is NOT int
Output for 5.2.13
c 0.334 is NOT int
Output for 5.2.12
c 16 is int c 6 is NOT int
Output for 5.2.11
c 0.74 is NOT int
Output for 5.2.7
c 0.051 is NOT int
Output for 5.2.5
c 19 is int c 20 is int c 14 is NOT int
Output for 5.2.4
c 0 is int c 0.4 is NOT int
Output for 5.2.3
c 14 is int c 6 is int c 10 is int c 0.31 is NOT int
Output for 5.2.1
c 0.541 is NOT int
Output for 5.1.6
c 0.614 is NOT int
Output for 5.1.5
c 0.372 is NOT int
Output for 5.1.4
c 4 is int c 0.015 is NOT int
Output for 5.1.3
c 0.183 is NOT int
Output for 5.1.1
c 5.97 is NOT int
Output for 5.1.0
c 0.247 is NOT int
Output for 5.0.5
c 0.185 is NOT int
Output for 5.0.4
c 2.1 is NOT int
Output for 5.0.3
c 14 is int c 6 is NOT int
Output for 5.0.2
c 6.78 is NOT int
Output for 5.0.1
c 1.82 is NOT int
Output for 5.0.0
c 2.3 is NOT int
Output for 4.4.9
c 0.23 is NOT int
Output for 4.4.8
c 20 is int c 14 is NOT int
Output for 4.4.6
c 3.54 is NOT int
Output for 4.4.5
c 1.4 is NOT int
Output for 4.4.4
c 15 is int c 10 is int c 2 is int c 17 is int c 0.04 is NOT int
Output for 4.4.2
c 0.496 is NOT int
Output for 4.4.0
c 8 is int c 0.14 is NOT int
Output for 4.3.11
c 5.18 is NOT int
Output for 4.3.10
c 3 is int c 0.558 is NOT int
Output for 4.3.9
c 2 is int c 17 is int c 10 is NOT int
Output for 4.3.8
c 13 is int c 6 is int c 2.95 is NOT int
Output for 4.3.7
c 14 is NOT int
Output for 4.3.6
c 0.039 is NOT int
Output for 4.3.5
c 0 is int c 1.87 is NOT int
Output for 4.3.4
c 20 is int c 0.25 is NOT int
Output for 4.3.3
c 13 is int c 14 is int c 3.36 is NOT int
Output for 4.3.2
c 13 is int c 0.625 is NOT int
Output for 4.3.1
c 2.84 is NOT int
Output for 4.3.0
c 13 is int c 0.264 is NOT int