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; "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.0070.01115.04
7.4.00.0110.00714.71
7.3.130.0120.00315.04
7.3.120.0070.01014.94
7.3.110.0100.00615.06
7.3.100.0120.00314.89
7.3.90.0040.01114.93
7.3.80.0070.00714.77
7.3.70.0040.00814.95
7.3.60.0120.00614.76
7.3.50.0000.01314.75
7.3.40.0040.01114.89
7.3.30.0090.00614.54
7.3.20.0040.01116.67
7.3.10.0100.00316.54
7.3.00.0090.00316.73
7.2.260.0130.00015.21
7.2.250.0130.00314.77
7.2.240.0000.01614.99
7.2.230.0070.00714.68
7.2.220.0090.00914.96
7.2.210.0040.01215.08
7.2.200.0070.00714.67
7.2.190.0100.00714.84
7.2.180.0070.00715.05
7.2.170.0040.01014.91
7.2.160.0060.01014.84
7.2.150.0090.00916.80
7.2.140.0000.01516.64
7.2.130.0070.00716.94
7.2.120.0070.01116.76
7.2.110.0060.00616.82
7.2.100.0000.01216.82
7.2.90.0080.00816.85
7.2.80.0070.00716.57
7.2.70.0070.00716.78
7.2.60.0070.01116.77
7.2.50.0070.00716.99
7.2.40.0060.00917.04
7.2.30.0130.00316.92
7.2.20.0090.00917.01
7.2.10.0070.01017.02
7.2.00.0050.00818.06
7.1.330.0080.00815.79
7.1.320.0030.01215.76
7.1.310.0030.00615.74
7.1.300.0150.00315.63
7.1.290.0090.00615.93
7.1.280.0090.00615.97
7.1.270.0090.00915.54
7.1.260.0040.00715.41
7.1.250.0070.01015.82
7.1.240.0080.00415.70
7.1.230.0070.00715.55
7.1.220.0070.00715.84
7.1.210.0060.00715.61
7.1.200.0070.00415.58
7.1.190.0030.00715.79
7.1.180.0070.00715.77
7.1.170.0060.00315.81
7.1.160.0040.00415.80
7.1.150.0000.01715.98
7.1.140.0030.01015.82
7.1.130.0070.00715.96
7.1.120.0090.00615.86
7.1.110.0080.00415.97
7.1.100.0080.00415.81
7.1.90.0040.01115.51
7.1.80.0070.00715.89
7.1.70.0000.01116.36
7.1.60.0130.00317.51
7.1.50.0020.00916.38
7.1.40.0080.00815.91
7.1.30.0090.00615.76
7.1.20.0000.01415.87
7.1.10.0040.01115.76
7.1.00.0080.03019.09
7.0.330.0070.00415.43
7.0.320.0110.00415.43
7.0.310.0030.00915.38
7.0.300.0080.00415.43
7.0.290.0030.00615.49
7.0.280.0040.01115.59
7.0.270.0090.00315.19
7.0.260.0080.00015.46
7.0.250.0100.00315.42
7.0.240.0070.01015.47
7.0.230.0040.00815.43
7.0.220.0070.00715.48
7.0.210.0060.00315.46
7.0.200.0020.01016.02
7.0.190.0090.00015.51
7.0.180.0030.00915.59
7.0.170.0080.00315.49
7.0.160.0000.01315.43
7.0.150.0040.00415.55
7.0.140.0050.04018.79
7.0.130.0060.00315.30
7.0.120.0050.03618.72
7.0.110.0040.01115.43
7.0.100.0070.00715.49
7.0.90.0060.00315.42
7.0.80.0030.01315.43
7.0.70.0060.00915.29
7.0.60.0190.04417.73
7.0.50.0070.04516.63
7.0.40.0050.04416.99
7.0.30.0120.03716.73
7.0.20.0240.03516.93
7.0.10.0100.04016.79
7.0.00.0100.04316.80
5.6.400.0030.01314.35
5.6.390.0100.00013.95
5.6.380.0030.01313.90
5.6.370.0030.01014.45
5.6.360.0070.00714.57
5.6.350.0070.00314.36
5.6.340.0030.01314.39
5.6.330.0040.00714.56
5.6.320.0060.00614.27
5.6.310.0040.01114.52
5.6.300.0000.01714.49
5.6.290.0060.01014.30
5.6.280.0070.03717.76
5.6.270.0040.01413.98
5.6.260.0000.01114.43
5.6.250.0040.00814.06
5.6.240.0000.01414.13
5.6.230.0070.01014.60
5.6.220.0030.01014.36
5.6.210.0090.04417.32
5.6.200.0060.02516.19
5.6.190.0050.02817.44
5.6.180.0130.02517.49
5.6.170.0180.04217.32
5.6.160.0110.02817.31
5.6.150.0040.04716.24
5.6.140.0050.02616.15
5.6.130.0070.02516.13
5.6.120.0020.03217.68
5.6.110.0000.04917.62
5.6.100.0100.03517.67
5.6.90.0080.04417.60
5.6.80.0050.03917.40
5.6.70.0000.01414.34
5.6.60.0000.00914.21
5.6.50.0050.00814.25
5.6.40.0070.00314.18
5.6.30.0060.00614.17
5.6.20.0040.01114.48
5.6.10.0000.00914.38
5.6.00.0090.00313.89
5.5.380.0080.00413.85
5.5.370.0170.00014.46
5.5.360.0090.00314.38
5.5.350.0080.04217.38
5.5.340.0080.04415.94
5.5.330.0090.04017.22
5.5.320.0150.03517.24
5.5.310.0170.03617.37
5.5.300.0070.05016.22
5.5.290.0020.03816.23
5.5.280.0090.04017.62
5.5.270.0100.04217.72
5.5.260.0020.02517.49
5.5.250.0100.04017.28
5.5.240.0130.03317.31
5.5.230.0000.01414.10
5.5.220.0000.01514.15
5.5.210.0090.00414.01
5.5.200.0060.00614.12
5.5.190.0060.00614.47
5.5.180.0000.01114.04
5.5.170.0110.00014.14
5.5.160.0130.00314.37
5.5.150.0150.00014.25
5.5.140.0100.00313.87
5.5.130.0150.00014.32
5.5.120.0040.00814.41
5.5.110.0030.01314.10
5.5.100.0040.00814.24
5.5.90.0110.00014.30
5.5.80.0100.00313.98
5.5.70.0100.00014.02
5.5.60.0070.00414.14
5.5.50.0060.00614.04
5.5.40.0070.00714.43
5.5.30.0060.00314.00
5.5.20.0030.00614.27
5.5.10.0030.00914.07
5.5.00.0060.01013.89
5.4.450.0060.04015.94
5.4.440.0050.03416.04
5.4.430.0050.02516.02
5.4.420.0050.02816.07
5.4.410.0020.04516.03
5.4.400.0040.03015.89
5.4.390.0050.04215.72
5.4.380.0030.04015.77
5.4.370.0020.03315.86
5.4.360.0020.03015.86
5.4.350.0030.02715.86
5.4.340.0060.02015.93
5.4.330.0080.00412.63
5.4.320.0000.03215.94
5.4.310.0050.03115.78
5.4.300.0050.02815.85
5.4.290.0020.03215.94
5.4.280.0050.02315.71
5.4.270.0040.04015.85
5.4.260.0020.04515.89
5.4.250.0030.02815.89
5.4.240.0050.03715.92
5.4.230.0020.03715.86
5.4.220.0020.02415.93
5.4.210.0070.03915.93
5.4.200.0050.02815.93
5.4.190.0020.04615.85
5.4.180.0000.04215.75
5.4.170.0050.02515.87
5.4.160.0030.04415.74
5.4.150.0050.02915.84
5.4.140.0050.03014.40
5.4.130.0060.04014.48
5.4.120.0090.03014.45
5.4.110.0030.03714.42
5.4.100.0080.02514.41
5.4.90.0070.03514.56
5.4.80.0030.03914.42
5.4.70.0030.02814.34
5.4.60.0050.03814.50
5.4.50.0060.02614.44
5.4.40.0050.02514.50
5.4.30.0030.03614.52
5.4.20.0000.03614.53
5.4.10.0060.02114.54
5.4.00.0030.01914.13
5.3.290.0030.03313.72
5.3.280.0090.03313.72
5.3.270.0000.04613.72
5.3.260.0070.03813.72
5.3.250.0030.04113.72
5.3.240.0020.04013.72
5.3.230.0000.04613.72
5.3.220.0000.03013.72
5.3.210.0060.03613.72
5.3.200.0020.03913.72
5.3.190.0030.04513.72
5.3.180.0040.03813.72
5.3.170.0020.03213.72
5.3.160.0040.02413.72
5.3.150.0060.03713.72
5.3.140.0030.03313.72
5.3.130.0080.02813.72
5.3.120.0050.04013.72
5.3.110.0030.04013.72
5.3.100.0070.03813.72
5.3.90.0030.03713.72
5.3.80.0030.04513.72
5.3.70.0030.03913.72
5.3.60.0030.04013.72
5.3.50.0030.03313.72
5.3.40.0070.03013.72
5.3.30.0020.03413.72
5.3.20.0020.03013.72
5.3.10.0030.03113.72
5.3.00.0020.02913.72
5.2.170.0030.06314.82
5.2.160.0030.06314.82
5.2.150.0030.03714.82
5.2.140.0000.07314.82
5.2.130.0000.06014.82
5.2.120.0000.05314.82
5.2.110.0030.05714.82
5.2.100.0000.03714.82
5.2.90.0030.06014.82
5.2.80.0000.05014.82
5.2.70.0000.06714.82
5.2.60.0000.05714.82
5.2.50.0000.04314.82
5.2.40.0000.03314.82
5.2.30.0000.03014.82
5.2.20.0000.05014.82
5.2.10.0030.04314.82
5.2.00.0030.03014.82
5.1.60.0070.02314.82
5.1.50.0000.04014.82
5.1.40.0000.04314.82
5.1.30.0070.04314.82
5.1.20.0030.03714.82
5.1.10.0000.03314.82
5.1.00.0000.04014.82
5.0.50.0000.02314.82
5.0.40.0030.04014.82
5.0.30.0000.05314.82
5.0.20.0070.02314.82
5.0.10.0070.03014.82
5.0.00.0000.04714.82
4.4.90.0000.03714.82
4.4.80.0030.02314.82
4.4.70.0000.03314.82
4.4.60.0030.03014.82
4.4.50.0100.02314.82
4.4.40.0000.05314.82
4.4.30.0030.03314.82
4.4.20.0070.01714.82
4.4.10.0000.03314.82
4.4.00.0030.05314.82
4.3.110.0070.02314.82
4.3.100.0000.01714.82
4.3.90.0000.02314.82
4.3.80.0030.05014.82
4.3.70.0070.03314.82
4.3.60.0030.04014.82
4.3.50.0000.03714.82
4.3.40.0070.05014.82
4.3.30.0030.01314.82
4.3.20.0000.03714.82
4.3.10.0000.03314.82
4.3.00.0000.02714.82

preferences:
40.22 ms | 401 KiB | 5 Q