3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.4.00.0090.00614.98
7.3.120.0060.01314.83
7.3.110.0000.01614.84
7.3.100.0060.00914.99
7.3.90.0060.00914.84
7.3.80.0060.00914.56
7.3.70.0140.00014.83
7.3.60.0030.00914.68
7.3.50.0120.00014.77
7.3.40.0040.01114.90
7.3.30.0100.00314.82
7.3.20.0030.01416.65
7.3.10.0060.00616.67
7.3.00.0040.01116.58
7.2.250.0070.01015.22
7.2.240.0030.01315.08
7.2.230.0000.01515.08
7.2.220.0000.01215.16
7.2.210.0040.00815.12
7.2.200.0060.00915.07
7.2.190.0130.00314.98
7.2.180.0100.00314.74
7.2.170.0000.01515.07
7.2.00.0000.01419.28
7.1.330.0000.01715.80
7.1.320.0060.00915.91
7.1.310.0070.00715.82
7.1.300.0090.00615.69
7.1.290.0000.01415.85
7.1.280.0030.00715.76
7.1.270.0110.00315.67
7.1.260.0030.00915.87
7.1.70.0040.00417.18
7.1.60.0130.01319.29
7.1.50.0100.01016.90
7.1.00.0170.06322.33
7.0.200.0070.00716.59
7.0.140.0070.07022.00
7.0.60.0070.07319.88
7.0.50.0100.07717.91
7.0.40.0170.08020.09
7.0.30.0270.03320.17
7.0.20.0270.06320.16
7.0.10.0230.07720.13
7.0.00.0130.04720.38
5.6.280.0070.07021.14
5.6.210.0170.07020.65
5.6.200.0070.04318.21
5.6.190.0100.09020.39
5.6.180.0400.05020.41
5.6.170.0330.08020.71
5.6.160.0100.06320.41
5.6.150.0070.06318.18
5.6.140.0030.07318.22
5.6.130.0030.04318.16
5.6.120.0130.08021.00
5.6.110.0030.08721.01
5.6.100.0070.07320.97
5.6.90.0000.04320.97
5.6.80.0000.04020.49
5.6.70.1830.04320.38
5.5.350.0030.08020.33
5.5.340.0070.03717.98
5.5.330.0170.06720.44
5.5.320.0030.04720.31
5.5.310.0330.05320.50
5.5.300.0070.08017.98
5.5.290.0200.07017.91
5.5.280.0100.08020.74
5.5.270.0030.08020.68
5.5.260.0100.08320.98
5.5.250.0030.08720.71
5.5.240.0230.06020.24
5.4.450.0230.07019.41
5.4.440.0170.04319.57
5.4.430.0270.03319.40
5.4.420.0130.04719.57
5.4.410.0230.03319.33
5.4.400.0200.04719.09
5.4.390.0330.05318.77
5.4.380.0430.05318.80
5.4.370.0100.04319.06
5.4.360.0170.03718.93
5.4.350.0170.03719.28
5.4.340.0170.03719.24
5.4.320.0200.03718.91
5.4.310.0170.04019.09
5.4.300.0170.04019.25
5.4.290.0170.03719.09
5.4.280.0270.03318.91
5.4.270.0200.04019.13
5.4.260.0470.02719.06
5.4.250.0170.05018.91
5.4.240.0200.04718.88
5.4.230.0200.06019.07
5.4.220.0330.06019.17
5.4.210.0170.04019.13
5.4.200.0270.03319.07
5.4.190.0170.05019.15
5.4.180.0270.07319.08
5.4.170.0300.03319.14
5.4.160.0130.04718.86
5.4.150.0200.04019.22
5.4.140.0200.03316.26
5.4.130.0230.03716.40
5.4.120.0200.03716.40
5.4.110.0270.06016.34
5.4.100.0270.06016.19
5.4.90.0270.03016.21
5.4.80.0570.06016.42
5.4.70.0300.05716.18
5.4.60.0300.05016.20
5.4.50.0370.05716.36
5.4.40.0300.05316.19
5.4.30.0270.06716.47
5.4.20.0230.04316.43
5.4.10.0370.06016.36
5.4.00.0300.04015.61
5.3.290.0270.05314.62
5.3.280.0330.07014.51
5.3.270.0270.07014.71
5.3.260.0230.03714.60
5.3.250.0300.05314.46
5.3.240.0330.06314.63
5.3.230.0530.06714.55
5.3.220.0430.07014.50
5.3.210.0270.05714.67
5.3.200.0500.06014.42
5.3.190.0370.06714.52
5.3.180.0430.05714.41
5.3.170.0300.05314.41
5.3.160.0200.04314.52
5.3.150.0300.06714.52
5.3.140.0170.04014.42
5.3.130.0330.07014.50
5.3.120.0270.07014.52
5.3.110.0230.04314.50
5.3.100.0300.06013.92
5.3.90.0330.03313.87
5.3.80.0230.04714.01
5.3.70.0170.04013.82
5.3.60.0170.03714.00
5.3.50.0370.06013.79
5.3.40.0570.06013.98
5.3.30.0330.06013.82
5.3.20.0400.05713.54
5.3.10.0270.07013.61
5.3.00.0300.04313.51
5.2.170.0200.06311.02
5.2.160.0270.05711.32
5.2.150.0230.03311.21
5.2.140.0100.03711.06
5.2.130.0270.05011.06
5.2.120.0130.04010.98
5.2.110.0200.05311.05
5.2.100.0130.06011.00
5.2.90.0200.06311.13
5.2.80.0270.05310.96
5.2.70.0430.04010.93
5.2.60.0170.02711.01
5.2.50.0070.04310.96
5.2.40.0130.03710.84
5.2.30.0470.03310.84
5.2.20.0170.06310.83
5.2.10.0230.03011.01
5.2.00.0170.03710.70
5.1.60.0130.0539.98
5.1.50.0170.04710.01
5.1.40.0300.0409.88
5.1.30.0170.02710.27
5.1.20.0200.05710.61
5.1.10.0200.04310.13
5.1.00.0170.04010.16
5.0.50.0130.0438.47
5.0.40.0070.0438.43
5.0.30.0100.0478.13
5.0.20.0270.0278.12
5.0.10.0030.0238.12
5.0.00.0030.0338.07
4.4.90.0030.0177.90
4.4.80.0130.0307.90
4.4.70.0100.0207.90
4.4.60.0100.0307.90
4.4.50.0030.0177.90
4.4.40.0070.0277.90
4.4.30.0030.0207.90
4.4.20.0030.0177.90
4.4.10.0100.0137.90
4.4.00.0030.0307.90
4.3.110.0070.0137.90
4.3.100.0130.0107.90
4.3.90.0070.0237.90
4.3.80.0030.0307.90
4.3.70.0070.0337.90
4.3.60.0100.0207.90
4.3.50.0070.0177.90
4.3.40.0070.0207.90
4.3.30.0000.0207.90
4.3.20.0030.0237.90
4.3.10.0000.0177.90
4.3.00.0030.0337.90

preferences:
37.36 ms | 401 KiB | 5 Q