3v4l.org

run code in 300+ PHP versions simultaneously
<pre> <? 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.70.0090.00916.63
8.3.60.0070.01418.30
8.3.50.0070.00921.14
8.3.40.0100.01018.89
8.3.30.0110.00420.23
8.3.20.0040.00420.04
8.3.10.0030.00522.07
8.3.00.0050.00322.38
8.2.180.0040.01116.32
8.2.170.0140.00422.96
8.2.160.0070.00722.31
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0080.00020.80
8.2.110.0030.00620.52
8.2.100.0060.00617.53
8.2.90.0040.00419.17
8.2.80.0040.00419.41
8.2.70.0000.01017.50
8.2.60.0070.00018.04
8.2.50.0030.00618.07
8.2.40.0040.00418.09
8.2.30.0000.00719.30
8.2.20.0030.00517.39
8.2.10.0000.00817.55
8.2.00.0040.00417.55
8.1.280.0130.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00423.91
8.1.230.0030.00922.64
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0050.00217.38
8.1.180.0040.00418.10
8.1.170.0060.00318.56
8.1.160.0040.00418.66
8.1.150.0060.00318.50
8.1.140.0000.00717.31
8.1.130.0030.00317.62
8.1.120.0030.00417.16
8.1.110.0000.00817.27
8.1.100.0000.00717.37
8.1.90.0030.00317.30
8.1.80.0040.00417.30
8.1.70.0030.00317.32
8.1.60.0040.00417.34
8.1.50.0050.00217.39
8.1.40.0070.00017.29
8.1.30.0050.00317.34
8.1.20.0000.00817.39
8.1.10.0000.00717.41
8.1.00.0000.00717.26
8.0.300.0070.00018.77
8.0.290.0040.00317.05
8.0.280.0000.00718.37
8.0.270.0050.00217.18
8.0.260.0040.00416.65
8.0.250.0070.00016.88
8.0.240.0000.00816.82
8.0.230.0000.00616.82
8.0.220.0030.00316.80
8.0.210.0070.00016.71
8.0.200.0030.00316.84
8.0.190.0070.00416.82
8.0.180.0030.00316.76
8.0.170.0040.00416.82
8.0.160.0000.00716.79
8.0.150.0040.00416.71
8.0.140.0040.00316.70
8.0.130.0000.00513.44
8.0.120.0040.00416.69
8.0.110.0030.00516.64
8.0.100.0040.00416.73
8.0.90.0080.00016.77
8.0.80.0110.00416.73
8.0.70.0080.00016.64
8.0.60.0070.00016.82
8.0.50.0040.00416.54
8.0.30.0130.00816.88
8.0.20.0080.01117.40
8.0.10.0000.00716.91
8.0.00.0100.00816.47
7.4.330.0060.00015.14
7.4.320.0000.00616.49
7.4.300.0000.00716.40
7.4.290.0030.00316.40
7.4.280.0030.00316.35
7.4.270.0070.00016.29
7.4.260.0030.00313.15
7.4.250.0040.00416.32
7.4.240.0020.00516.31
7.4.230.0000.00716.36
7.4.220.0030.01516.56
7.4.210.0060.00916.46
7.4.200.0040.00416.45
7.4.190.0000.00716.42
7.4.160.0040.01116.36
7.4.150.0130.00317.40
7.4.140.0110.00617.86
7.4.130.0100.00716.41
7.4.120.0080.01016.38
7.4.110.0100.00716.36
7.4.100.0060.01016.30
7.4.90.0130.00616.20
7.4.80.0000.01719.39
7.4.70.0110.00816.36
7.4.60.0030.01916.31
7.4.50.0000.00816.12
7.4.40.0070.00722.77
7.4.30.0160.00016.22
7.3.330.0000.00613.23
7.3.320.0000.00613.08
7.3.310.0030.00316.20
7.3.300.0030.00316.14
7.3.290.0060.00916.07
7.3.280.0090.00816.15
7.3.270.0060.01217.40
7.3.260.0080.00816.14
7.3.250.0170.00516.31
7.3.240.0120.00916.20
7.3.230.0090.01316.41
7.3.210.0160.00016.24
7.3.200.0080.00819.39
7.3.190.0060.01016.13
7.3.180.0070.01316.30
7.3.170.0110.00916.27
7.3.160.0060.00916.13
7.2.330.0070.01016.53
7.2.320.0060.01216.48
7.2.310.0140.00716.43
7.2.300.0090.01316.48
7.2.290.0060.01016.48
5.5.80.0070.07020.13
5.5.70.0030.08720.14
5.5.60.0030.05320.14
5.5.50.0030.05719.96
5.5.40.0070.04020.14
5.5.30.0100.07020.09
5.5.20.0130.07020.14
5.5.10.0070.08320.03
5.5.00.0070.07320.09
5.4.240.0070.04019.13
5.4.230.0100.07019.17
5.4.220.0070.06018.94
5.4.210.0170.06719.04
5.4.200.0130.03019.20
5.4.190.0070.07018.86
5.4.180.0100.05018.84
5.4.170.0100.07319.03
5.4.160.0170.04019.07
5.4.150.0130.07019.03
5.4.140.0000.08016.51
5.4.130.0070.07716.46
5.4.120.0000.04016.46
5.4.110.0000.06716.52
5.4.100.0070.04716.50
5.4.90.0030.06316.53
5.4.80.0030.04316.54
5.4.70.0000.04016.39
5.4.60.0030.07016.32
5.4.50.0070.04316.46
5.4.40.0100.06316.36
5.4.30.0100.05316.32
5.4.20.0030.05716.38
5.4.10.0070.03716.39
5.4.00.0130.06315.86
5.3.290.0130.06714.62
5.3.280.0030.04314.42
5.3.270.0200.05014.45
5.3.260.0100.07714.59
5.3.250.0130.06014.42
5.3.240.0000.04714.54
5.3.230.0030.04014.58
5.3.220.0070.07014.57
5.3.210.0070.04014.52
5.3.200.0130.07714.52
5.3.190.0070.04014.55
5.3.180.0030.04014.42
5.3.170.0100.03314.41
5.3.160.0070.05014.54
5.3.150.0100.06314.41
5.3.140.0070.07714.51
5.3.130.0070.04314.50
5.3.120.0070.06314.52
5.3.110.0030.07314.52
5.3.100.0100.07014.04
5.3.90.0100.07713.87
5.3.80.0030.04314.02
5.3.70.0030.04013.93
5.3.60.0030.04313.99
5.3.50.0030.04013.90
5.3.40.0000.06013.71
5.3.30.0100.03313.90
5.3.20.0070.04313.59
5.3.10.0000.04713.51
5.3.00.0070.05713.60
5.2.170.0030.06311.20
5.2.160.0030.04311.09
5.2.150.0030.06011.20
5.2.140.0030.05011.13
5.2.130.0030.03011.16
5.2.120.0070.05010.88
5.2.110.0030.04710.94
5.2.100.0000.04311.09
5.2.90.0000.03011.13
5.2.80.0000.04711.09
5.2.70.0070.03011.16
5.2.60.0100.06011.03
5.2.50.0000.03710.86
5.2.40.0030.04010.85
5.2.30.0030.03010.89
5.2.20.0070.04710.88
5.2.10.0130.04310.93
5.2.00.0030.03310.56
5.1.60.0070.0409.98
5.1.50.0070.0509.97
5.1.40.0030.0509.98
5.1.30.0100.05010.37
5.1.20.0100.02310.39
5.1.10.0030.02710.09
5.1.00.0100.0479.94
5.0.50.0000.0339.57
5.0.40.0030.0439.57
5.0.30.0070.0539.57
5.0.20.0070.0309.57
5.0.10.0000.0309.57
5.0.00.0070.0379.57
4.4.90.0030.0179.57
4.4.80.0070.0139.57
4.4.70.0000.0209.57
4.4.60.0030.0179.57
4.4.50.0000.0179.57
4.4.40.0000.0379.57
4.4.30.0000.0239.57
4.4.20.0000.0309.57
4.4.10.0000.0209.57
4.4.00.0030.0509.57
4.3.110.0030.0309.57
4.3.100.0070.0339.57
4.3.90.0070.0179.57
4.3.80.0030.0539.57
4.3.70.0030.0239.57
4.3.60.0030.0179.57
4.3.50.0000.0209.57
4.3.40.0030.0239.57
4.3.30.0100.0209.57
4.3.20.0000.0209.57
4.3.10.0030.0139.57
4.3.00.0070.0179.57

preferences:
49.68 ms | 401 KiB | 5 Q