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; } echo "a: $a. b: $b. "; $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.10.0040.01515.11
7.4.00.0040.01514.84
7.3.130.0070.00914.78
7.3.120.0100.00614.88
7.3.110.0100.00614.65
7.3.100.0080.00814.83
7.3.90.0050.01114.88
7.3.80.0090.00514.74
7.3.70.0120.00314.92
7.3.60.0080.00714.82
7.3.50.0050.01114.79
7.3.40.0090.00514.74
7.3.30.0070.00714.78
7.3.20.0070.00416.68
7.3.10.0040.01116.37
7.3.00.0070.00716.65
7.2.260.0090.00815.01
7.2.250.0070.01115.05
7.2.240.0050.01115.00
7.2.230.0080.00315.01
7.2.220.0060.00714.99
7.2.210.0070.01014.92
7.2.200.0070.01015.00
7.2.190.0030.01015.01
7.2.180.0050.01214.96
7.2.170.0060.01014.93
7.2.160.0090.00614.87
7.2.150.0050.00616.80
7.2.140.0090.00616.94
7.2.130.0050.01016.91
7.2.120.0060.00616.72
7.2.110.0060.01016.98
7.2.100.0080.00916.79
7.2.90.0020.01416.95
7.2.80.0050.01216.87
7.2.70.0050.01116.83
7.2.60.0030.01116.88
7.2.50.0080.00716.98
7.2.40.0070.01216.80
7.2.30.0090.00616.78
7.2.20.0050.01116.87
7.2.10.0050.01116.74
7.2.00.0050.00917.61
7.1.330.0060.00815.92
7.1.320.0080.00515.81
7.1.310.0050.00715.98
7.1.300.0060.00615.83
7.1.290.0030.01015.82
7.1.280.0040.01015.85
7.1.270.0000.01115.88
7.1.260.0080.00415.87
7.1.250.0080.00515.84
7.1.240.0080.00815.87
7.1.230.0080.00515.72
7.1.220.0020.00915.88
7.1.210.0060.00915.90
7.1.200.0100.00615.93
7.1.190.0050.00815.51
7.1.180.0100.00615.72
7.1.170.0060.01015.86
7.1.160.0050.00815.87
7.1.150.0090.00615.70
7.1.140.0020.01015.91
7.1.130.0060.00915.90
7.1.120.0050.00615.75
7.1.110.0080.00815.85
7.1.100.0050.01015.65
7.1.90.0060.00915.84
7.1.80.0030.00815.66
7.1.70.0060.00516.26
7.1.60.0020.01116.28
7.1.50.0060.01016.33
7.1.40.0100.00515.78
7.1.30.0030.00915.75
7.1.20.0070.00715.59
7.1.10.0040.01015.88
7.1.00.0090.02517.92
7.0.330.0020.00715.45
7.0.320.0100.00315.46
7.0.310.0090.00715.49
7.0.300.0020.01215.42
7.0.290.0100.00615.42
7.0.280.0070.00515.45
7.0.270.0060.00815.61
7.0.260.0060.00515.54
7.0.250.0050.01015.38
7.0.240.0040.01115.50
7.0.230.0110.00415.54
7.0.220.0060.00715.53
7.0.210.0090.00515.49
7.0.200.0040.00915.88
7.0.190.0090.00315.55
7.0.180.0100.00515.46
7.0.170.0040.01115.49
7.0.160.0050.00815.41
7.0.150.0070.00715.41
7.0.140.0070.02717.79
7.0.130.0030.00715.44
7.0.120.0060.01417.71
7.0.110.0040.00815.39
7.0.100.0070.00715.25
7.0.90.0050.00615.36
7.0.80.0050.01015.44
7.0.70.0060.00615.43
7.0.60.0050.02517.02
7.0.50.0020.02016.28
7.0.40.0080.02015.63
7.0.30.0090.02315.67
7.0.20.0040.02115.77
7.0.10.0070.03315.60
7.0.00.0070.01815.69
5.6.400.0030.01414.60
5.6.390.0030.00814.44
5.6.380.0050.00914.60
5.6.370.0030.01214.61
5.6.360.0030.01314.42
5.6.350.0070.00914.55
5.6.340.0060.00714.50
5.6.330.0080.00614.20
5.6.320.0030.01314.42
5.6.310.0040.01114.28
5.6.300.0070.00914.15
5.6.290.0090.00314.52
5.6.280.0000.03516.52
5.6.270.0100.00514.59
5.6.260.0050.01214.22
5.6.250.0060.00814.38
5.6.240.0040.00814.44
5.6.230.0010.00914.49
5.6.220.0020.01114.28
5.6.210.0060.02316.51
5.6.200.0040.03415.52
5.6.190.0070.03516.41
5.6.180.0050.02916.39
5.6.170.0060.02716.48
5.6.160.0070.03116.26
5.6.150.0040.02216.37
5.6.140.0090.03316.31
5.6.130.0080.02716.31
5.6.120.0040.03416.39
5.6.110.0050.01716.24
5.6.100.0050.03416.27
5.6.90.0080.03116.15
5.6.80.0070.03416.07
5.6.70.0090.02316.02
5.6.60.0080.02416.12
5.6.50.0060.03316.20
5.6.40.0100.02116.05
5.6.30.0070.03316.17
5.6.20.0110.01816.02
5.6.10.0070.01616.20
5.6.00.0060.03116.12
5.5.380.0080.00714.15
5.5.370.0030.00713.93
5.5.360.0040.00814.15
5.5.350.0070.03016.40
5.5.340.0070.03215.38
5.5.330.0080.02116.27
5.5.320.0040.02216.17
5.5.310.0080.01716.17
5.5.300.0110.02616.21
5.5.290.0050.03316.17
5.5.280.0070.03216.28
5.5.270.0050.03616.25
5.5.260.0050.03216.24
5.5.250.0040.03415.88
5.5.240.0020.02915.95
5.5.230.0070.02216.03
5.5.220.0080.03015.93
5.5.210.0050.03215.99
5.5.200.0070.02915.87
5.5.190.0110.01415.92
5.5.180.0120.02215.89
5.5.170.0070.00714.34
5.5.160.0090.02015.94
5.5.150.0040.01915.79
5.5.140.0100.01615.97
5.5.130.0090.02115.89
5.5.120.0070.02715.84
5.5.110.0080.03015.87
5.5.100.0030.02615.83
5.5.90.0080.02115.95
5.5.80.0050.02215.84
5.5.70.0060.02815.90
5.5.60.0060.01815.85
5.5.50.0050.02215.83
5.5.40.0040.03115.83
5.5.30.0020.02615.90
5.5.20.0070.03215.91
5.5.10.0070.01915.94
5.5.00.0060.03515.82
5.4.450.0020.02413.81
5.4.440.0060.02813.84
5.4.430.0010.02713.81
5.4.420.0080.03013.80
5.4.410.0030.01913.73
5.4.400.0050.02713.52
5.4.390.0060.02713.56
5.4.380.0040.03113.61
5.4.370.0060.01713.49
5.4.360.0080.02813.68
5.4.350.0050.02013.56
5.4.340.0100.02413.62
5.4.330.0030.00511.06
5.4.320.0030.03313.64
5.4.310.0060.02613.62
5.4.300.0060.01313.68
5.4.290.0040.02513.70
5.4.280.0090.02413.74
5.4.270.0060.02113.70
5.4.260.0070.02813.61
5.4.250.0050.01613.64
5.4.240.0010.02613.56
5.4.230.0020.03213.66
5.4.220.0030.03113.74
5.4.210.0080.01713.72
5.4.200.0040.02513.62
5.4.190.0020.02113.80
5.4.180.0030.02413.75
5.4.170.0040.02413.72
5.4.160.0020.02313.56
5.4.150.0020.02213.54
5.4.140.0090.02712.59
5.4.130.0050.01412.65
5.4.120.0080.02512.75
5.4.110.0040.02712.72
5.4.100.0060.01712.74
5.4.90.0010.02212.68
5.4.80.0060.02312.68
5.4.70.0040.03012.62
5.4.60.0090.02412.64
5.4.50.0060.02512.77
5.4.40.0080.02112.73
5.4.30.0020.02112.56
5.4.20.0060.02712.81
5.4.10.0070.02412.76
5.4.00.0060.02012.59
5.3.290.0050.03011.88
5.3.280.0010.03211.83
5.3.270.0060.02811.81
5.3.260.0060.02411.80
5.3.250.0040.02411.90
5.3.240.0010.03011.75
5.3.230.0070.02711.73
5.3.220.0070.01711.75
5.3.210.0060.02811.75
5.3.200.0060.02811.70
5.3.190.0060.01411.68
5.3.180.0030.02011.82
5.3.170.0040.02411.84
5.3.160.0080.02811.77
5.3.150.0020.02711.87
5.3.140.0030.02911.72
5.3.130.0060.02611.74
5.3.120.0020.02811.74
5.3.110.0090.02511.78
5.3.100.0060.02711.68
5.3.90.0010.03311.68
5.3.80.0060.02811.47
5.3.70.0020.02211.49
5.3.60.0040.03011.67
5.3.50.0080.02411.51
5.3.40.0060.01611.60
5.3.30.0040.02511.68
5.3.20.0050.02711.49
5.3.10.0040.02411.34
5.3.00.0060.02611.32
5.2.170.0030.06311.24
5.2.160.0070.02711.07
5.2.150.0000.03311.10
5.2.140.0070.04311.09
5.2.130.0030.03011.06
5.2.120.0030.05711.09
5.2.110.0030.06010.94
5.2.100.0100.05710.94
5.2.90.0000.04011.06
5.2.80.0000.06311.10
5.2.70.0070.06011.11
5.2.60.0000.05711.21
5.2.50.0070.06010.97
5.2.40.0030.06710.91
5.2.30.0030.06310.88
5.2.20.0070.05710.92
5.2.10.0070.04310.90
5.2.00.0030.03010.88
5.1.60.0000.02710.05
5.1.50.0130.04010.16
5.1.40.0070.03310.14
5.1.30.0170.04710.26
5.1.20.0070.05310.43
5.1.10.0030.02710.05
5.1.00.0000.02710.05
5.0.50.0000.0478.58
5.0.40.0030.0378.45
5.0.30.0000.0638.19
5.0.20.0070.0408.24
5.0.10.0030.0378.10
5.0.00.0000.0338.23
4.4.90.0000.0237.49
4.4.80.0030.0337.49
4.4.70.0000.0207.49
4.4.60.0070.0207.49
4.4.50.0070.0337.49
4.4.40.0070.0507.49
4.4.30.0100.0237.49
4.4.20.0030.0377.49
4.4.10.0030.0137.49
4.4.00.0070.0407.49
4.3.110.0000.0377.49
4.3.100.0000.0377.49
4.3.90.0000.0377.49
4.3.80.0000.0407.49
4.3.70.0000.0337.49
4.3.60.0000.0377.49
4.3.50.0070.0307.49
4.3.40.0030.0377.49
4.3.30.0000.0407.49
4.3.20.0000.0277.49
4.3.10.0030.0337.49
4.3.00.0000.0307.49

preferences:
62.65 ms | 401 KiB | 5 Q