3v4l.org

run code in 300+ PHP versions simultaneously
function foo($in = false) {} function test($in) { $start = microtime(true); for ($i = 0; $i < 10000; $i++) { foo(!!$in); } echo ((microtime(true) - $start) / 1000)."\n"; } function test2($in) { $start = microtime(true); for ($i = 0; $i < 10000; $i++) { foo((boolean)$in); } echo ((microtime(true) - $start) / 1000)."\n"; } test($tmp); test2($tmp); echo "\n"; $tmp = false; test($tmp); test2($tmp); echo "\n"; $tmp = '0'; test($tmp); test2($tmp); <?php

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)
8.3.60.0100.00718.43
8.3.50.0060.00921.15
8.3.40.0140.00018.53
8.3.30.0110.00420.13
8.3.20.0070.00020.02
8.3.10.0000.00821.92
8.3.00.0040.00422.40
8.2.180.0110.00416.50
8.2.170.0070.00722.96
8.2.160.0000.01422.16
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00620.59
8.2.110.0030.00622.25
8.2.100.0000.01217.78
8.2.90.0050.00319.28
8.2.80.0070.00019.21
8.2.70.0030.00717.50
8.2.60.0000.00717.80
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0040.00419.39
8.2.20.0000.00717.51
8.2.10.0040.00417.63
8.2.00.0040.00417.41
8.1.280.0140.00725.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0070.00319.14
8.1.220.0000.00717.74
8.1.210.0080.00018.77
8.1.200.0060.00317.23
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0080.00018.49
8.1.160.0000.00818.70
8.1.150.0070.00318.49
8.1.140.0040.00417.18
8.1.130.0000.00717.77
8.1.120.0000.00717.30
8.1.110.0030.00517.21
8.1.100.0000.00817.20
8.1.90.0000.00717.29
8.1.80.0000.00717.31
8.1.70.0040.00217.25
8.1.60.0030.00517.34
8.1.50.0070.00017.39
8.1.40.0000.00817.34
8.1.30.0070.00017.46
8.1.20.0040.00417.44
8.1.10.0050.00217.50
8.1.00.0000.00717.38
8.0.300.0070.00018.77
8.0.290.0030.00317.18
8.0.280.0070.00018.25
8.0.270.0030.00317.18
8.0.260.0030.00316.75
8.0.250.0030.00316.70
8.0.240.0050.00316.69
8.0.230.0030.00316.82
8.0.220.0030.00316.74
8.0.210.0000.00816.66
8.0.200.0060.00016.77
8.0.190.0080.00016.88
8.0.180.0030.00316.76
8.0.170.0000.00816.83
8.0.160.0000.00716.76
8.0.150.0070.00016.67
8.0.140.0040.00316.74
8.0.130.0050.00213.14
8.0.120.0030.00516.70
8.0.110.0040.00416.68
8.0.100.0070.00016.75
8.0.90.0040.00416.70
8.0.80.0030.01116.80
8.0.70.0000.00716.75
8.0.60.0000.00716.77
8.0.50.0050.00316.63
8.0.30.0160.00516.92
8.0.20.0150.00617.40
8.0.10.0050.00316.91
8.0.00.0060.01416.53
7.4.330.0000.00515.00
7.4.320.0030.00316.38
7.4.300.0030.00316.50
7.4.290.0040.00416.39
7.4.280.0000.00716.47
7.4.270.0000.00616.38
7.4.260.0030.00313.06
7.4.250.0030.00516.34
7.4.240.0050.00216.40
7.4.230.0050.00216.36
7.4.220.0090.00916.27
7.4.210.0050.00916.41
7.4.200.0030.00316.56
7.4.190.0070.00016.31
7.4.160.0060.00916.31
7.4.150.0180.00017.40
7.4.140.0100.00717.86
7.4.130.0050.01316.26
7.4.120.0120.00816.51
7.4.110.0110.00716.42
7.4.100.0100.01016.36
7.4.90.0040.01616.43
7.4.80.0110.00619.39
7.4.70.0110.00416.34
7.4.60.0040.01116.25
7.4.50.0030.00616.46
7.4.40.0060.01222.77
7.4.30.0060.01016.31
7.3.330.0030.00312.98
7.3.320.0000.00613.01
7.3.310.0030.00316.08
7.3.300.0050.00216.14
7.3.290.0080.00816.09
7.3.280.0080.00916.13
7.3.270.0120.00317.40
7.3.260.0130.00416.29
7.3.250.0130.00816.22
7.3.240.0090.01216.44
7.3.230.0160.00016.40
7.3.210.0060.00916.18
7.3.200.0100.00619.39
7.3.190.0130.01016.18
7.3.180.0030.01216.34
7.3.170.0110.00816.38
7.3.160.0100.00716.41
7.2.330.0060.01316.47
7.2.320.0060.01116.53
7.2.310.0080.00816.54
7.2.300.0200.00316.41
7.2.290.0150.00316.54
5.5.80.0130.07720.14
5.5.70.0100.05720.15
5.5.60.0000.07719.98
5.5.50.0070.06019.95
5.5.40.0130.07020.03
5.5.30.0070.08020.11
5.5.20.0000.08320.02
5.5.10.0170.06020.09
5.5.00.0200.06719.95
5.4.240.0070.07019.12
5.4.230.0070.07318.98
5.4.220.0200.06719.04
5.4.210.0000.05718.94
5.4.200.0100.07718.78
5.4.190.0030.07719.02
5.4.180.0030.04318.77
5.4.170.0100.07718.96
5.4.160.0070.06018.99
5.4.150.0100.06718.81
5.4.140.0070.04716.30
5.4.130.0130.07016.28
5.4.120.0070.03716.21
5.4.110.0070.04316.26
5.4.100.0000.06716.34
5.4.90.0100.06316.45
5.4.80.0100.07016.29
5.4.70.0100.06316.33
5.4.60.0070.06016.20
5.4.50.0030.04016.23
5.4.40.0030.06716.43
5.4.30.0030.07716.39
5.4.20.0130.07316.21
5.4.10.0070.07716.18
5.4.00.0100.04315.69
5.3.290.0000.03714.66
5.3.280.0070.07314.58
5.3.270.0170.07014.59
5.3.260.0070.05314.53
5.3.250.0070.03314.46
5.3.240.0030.08014.54
5.3.230.0030.07314.55
5.3.220.0030.05014.40
5.3.210.0030.04014.39
5.3.200.0000.04314.54
5.3.190.0030.07014.42
5.3.180.0130.06714.54
5.3.170.0000.03714.55
5.3.160.0070.03014.54
5.3.150.0070.07314.49
5.3.140.0000.07314.52
5.3.130.0100.06314.38
5.3.120.0030.08014.49
5.3.110.0170.07314.50
5.3.100.0070.07714.02
5.3.90.0100.07313.84
5.3.80.0130.07313.94
5.3.70.0170.06713.94
5.3.60.0130.04713.95
5.3.50.0030.05713.79
5.3.40.0030.07313.88
5.3.30.0030.07713.88
5.3.20.0100.04013.68
5.3.10.0130.03013.62
5.3.00.0000.06713.40
5.2.170.0130.05310.94
5.2.160.0070.06010.93
5.2.150.0070.06311.09
5.2.140.0130.02710.95
5.2.130.0030.03310.93
5.2.120.0070.05011.08
5.2.110.0100.04711.09
5.2.100.0070.05711.05
5.2.90.0030.03310.93
5.2.80.0000.03311.01
5.2.70.0030.04711.09
5.2.60.0070.06011.09
5.2.50.0100.06011.06
5.2.40.0030.05710.98
5.2.30.0030.04310.99
5.2.20.0030.03310.95
5.2.10.0030.04310.88
5.2.00.0030.06310.73
5.1.60.0070.0279.97
5.1.50.0000.03310.04
5.1.40.0030.05310.00
5.1.30.0070.03310.36
5.1.20.0100.05010.26
5.1.10.0030.04010.14
5.1.00.0100.04710.04
5.0.50.0030.0508.92
5.0.40.0030.0278.92
5.0.30.0070.0708.92
5.0.20.0030.0378.92
5.0.10.0000.0378.92
5.0.00.0000.0508.92
4.4.90.0070.0338.92
4.4.80.0000.0408.92
4.4.70.0030.0238.92
4.4.60.0000.0308.92
4.4.50.0000.0378.92
4.4.40.0070.0508.92
4.4.30.0100.0108.92
4.4.20.0070.0308.92
4.4.10.0100.0238.92
4.4.00.0030.0378.92
4.3.110.0030.0338.92
4.3.100.0030.0278.92
4.3.90.0000.0338.92
4.3.80.0100.0508.92
4.3.70.0030.0308.92
4.3.60.0070.0338.92
4.3.50.0030.0238.92
4.3.40.0070.0478.92
4.3.30.0030.0338.92
4.3.20.0070.0308.92
4.3.10.0000.0238.92
4.3.00.0030.0338.92

preferences:
40.68 ms | 401 KiB | 5 Q