3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(php_uname('s')); @mkdir(sys_get_temp_dir() . '/src', 0700); preg_match_all('/\`\`\`php(.*?)\`\`\`/s', file_get_contents('https://raw.github.com/php-fig/fig-standards/master/accepted/PSR-4-autoloader-examples.md'), $m); file_put_contents(sys_get_temp_dir() . '/autoloader.php', $m[1][0]); file_put_contents(sys_get_temp_dir() . '/src/Baz.php', "<?php namespace Foo\Bar; class BAZ {}"); file_put_contents(sys_get_temp_dir() . '/src/Buz.php', "<?php namespace Foo\Bar; class Buz {}"); require sys_get_temp_dir() . '/autoloader.php'; $c1 = new \Foo\Bar\Baz(); $c2 = new \Foo\Bar\BAZ(); var_dump($c1 == $c2); $c3 = new \Foo\Bar\BUZ(); $c4 = new \Foo\Bar\Buz(); var_dump($c3 == $c4);

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.0110.00416.88
8.3.50.0220.01016.71
8.3.40.0130.00719.27
8.3.30.0130.00618.92
8.3.20.0090.00019.14
8.3.10.0080.00019.10
8.3.00.0030.00619.50
8.2.180.0090.01317.00
8.2.170.0070.01322.96
8.2.160.0040.01118.91
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.01121.00
8.2.110.0070.00320.34
8.2.100.0100.00318.03
8.2.90.0080.00018.00
8.2.80.0040.00418.91
8.2.70.0040.00418.05
8.2.60.0030.00517.88
8.2.50.0000.00818.00
8.2.40.0040.00417.88
8.2.30.0030.00618.09
8.2.20.0030.00719.63
8.2.10.0040.00418.02
8.2.00.0040.00417.97
8.1.280.0090.00925.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0030.00723.82
8.1.230.0040.00820.73
8.1.220.0000.00817.76
8.1.210.0040.00418.77
8.1.200.0040.00417.36
8.1.190.0060.00317.22
8.1.180.0080.00018.10
8.1.170.0000.00818.91
8.1.160.0000.00818.81
8.1.150.0040.00418.63
8.1.140.0070.00017.48
8.1.130.0000.00717.87
8.1.120.0070.00417.47
8.1.110.0000.00717.65
8.1.100.0040.00417.57
8.1.90.0050.00317.48
8.1.80.0000.00817.42
8.1.70.0030.00317.57
8.1.60.0070.00317.76
8.1.50.0000.00717.66
8.1.40.0030.00517.68
8.1.30.0030.00717.71
8.1.20.0000.00817.82
8.1.10.0080.00017.75
8.1.00.0040.00417.66
8.0.300.0000.00818.77
8.0.290.0030.00517.00
8.0.280.0040.00418.55
8.0.270.0040.00417.26
8.0.260.0070.00017.18
8.0.250.0030.00517.30
8.0.240.0080.00017.20
8.0.230.0000.00717.24
8.0.220.0020.00517.26
8.0.210.0040.00417.18
8.0.200.0030.00317.14
8.0.190.0040.00417.23
8.0.180.0030.00717.27
8.0.170.0060.00317.15
8.0.160.0030.00517.19
8.0.150.0060.00317.20
8.0.140.0080.00317.10
8.0.130.0030.00313.54
8.0.120.0080.00017.18
8.0.110.0050.00317.02
8.0.100.0040.00417.21
8.0.90.0040.00417.04
8.0.80.0130.00317.15
8.0.70.0000.00817.14
8.0.60.0080.00017.13
8.0.50.0060.00316.98
8.0.30.0080.01217.37
8.0.20.0130.00617.47
8.0.10.0000.00817.15
8.0.00.0120.00717.00
7.4.330.0050.00013.09
7.4.320.0030.00316.83
7.4.300.0060.00016.89
7.4.290.0000.00716.87
7.4.280.0040.00416.73
7.4.270.0040.00416.72
7.4.260.0030.00313.40
7.4.250.0060.00316.82
7.4.240.0040.00416.68
7.4.230.0000.00716.75
7.4.220.0130.00616.72
7.4.210.0090.00916.86
7.4.200.0040.00416.86
7.4.190.0030.00316.57
7.4.160.0120.00616.58
7.4.150.0060.01416.84
7.4.140.0070.01116.68
7.4.130.0080.00916.70
7.4.120.0090.00916.73
7.4.110.0110.00816.80
7.4.100.0120.00616.70
7.4.90.0110.00916.67
7.4.80.0100.00719.39
7.4.70.0070.01016.75
7.4.60.0090.00916.76
7.4.50.0060.00416.42
7.4.40.0060.00916.55
7.4.30.0090.00916.79
7.4.00.0070.00715.17
7.3.330.0080.00013.47
7.3.320.0030.00313.29
7.3.310.0000.00816.58
7.3.300.0030.00316.60
7.3.290.0130.00316.47
7.3.280.0080.00916.57
7.3.270.0140.00816.50
7.3.260.0120.01216.61
7.3.250.0130.00616.62
7.3.240.0000.01616.58
7.3.230.0090.00916.66
7.3.210.0090.00916.52
7.3.200.0090.01016.62
7.3.190.0060.01216.66
7.3.180.0090.01016.71
7.3.170.0100.01116.59
7.3.160.0100.00616.68
7.3.120.0060.00915.27
7.2.330.0090.00916.82
7.2.320.0070.01816.78
7.2.310.0060.01216.78
7.2.300.0160.00316.86
7.2.290.0040.01616.96
7.2.60.0070.01017.02
7.2.00.0200.01019.50
7.1.200.0030.00915.98
7.1.100.0060.00618.62
7.1.70.0000.01017.78
7.1.60.0030.02319.40
7.1.50.0110.00417.04
7.1.00.0030.08022.68
7.0.200.0030.00716.77
7.0.140.0000.07722.34
7.0.120.0100.06022.44
7.0.60.0070.08320.43
7.0.50.0030.05718.27
7.0.40.0100.05320.58
7.0.30.0270.05020.62
7.0.20.0200.04720.54
7.0.10.0030.07720.53
7.0.00.0030.09020.65
5.6.280.0030.07721.36
5.6.210.0130.08020.76
5.6.200.0100.08018.51
5.6.190.0170.04321.06
5.6.180.2430.04321.09
5.6.170.0270.07020.82
5.6.160.0030.06020.82
5.6.150.0070.06718.45
5.6.140.0100.06018.48
5.6.130.0070.09018.65
5.6.120.0030.04321.51
5.6.110.0070.08021.25
5.6.100.0030.09021.24
5.6.90.0070.05321.41
5.6.80.0030.04020.64
5.6.70.4030.04020.71
5.5.350.0270.07720.65
5.5.340.0130.04718.54
5.5.330.0170.07320.87
5.5.320.0470.06720.66
5.5.310.0200.04720.68
5.5.300.0130.06318.27
5.5.290.0170.05718.32
5.5.280.0170.06021.19
5.5.270.0030.06021.19
5.5.260.0130.08021.14
5.5.250.0200.07020.90
5.5.240.0300.06720.55
5.4.450.2800.04319.94
5.4.440.0100.03320.04
5.4.430.1470.06020.14
5.4.420.3670.04320.07
5.4.410.3900.04019.65
5.4.400.0170.07019.63
5.4.390.4130.04019.68
5.4.380.4100.04019.82
5.4.370.3630.03719.73
5.4.360.2630.04319.76
5.4.350.4300.04719.64
5.4.340.3470.03319.63
5.4.320.3800.04019.75
5.4.310.3930.03319.68
5.4.300.4100.03319.58
5.4.290.3270.04319.75
5.4.280.3330.04019.74
5.4.270.3170.04019.75
5.4.260.3770.04019.71
5.4.250.4070.03319.72
5.4.240.3700.03019.57
5.4.230.3400.03719.68
5.4.220.2870.04719.70
5.4.210.3900.03719.74
5.4.200.4130.03719.63
5.4.190.4030.03319.72
5.4.180.3670.03719.74
5.4.170.3830.04019.75
5.4.160.4170.04019.71
5.4.150.2770.03719.72
5.4.140.3200.04316.46
5.4.130.3930.03716.50
5.4.120.3700.03716.48
5.4.110.3730.04016.51
5.4.100.3700.03016.46
5.4.90.2970.03016.44
5.4.80.3670.04016.20
5.4.70.3800.03716.36
5.4.60.3470.03016.37
5.4.50.4500.05016.45
5.4.40.4130.03716.25
5.4.30.3670.03316.11
5.4.20.3800.04016.57
5.4.10.4770.04016.13
5.4.00.2900.03315.85
5.3.290.3570.03314.64
5.3.280.3570.03714.54
5.3.270.3800.03714.56
5.3.260.3670.04314.64
5.3.250.3230.04714.45
5.3.240.2870.04014.50
5.3.230.3770.02714.56
5.3.220.3930.03714.51
5.3.210.3600.03714.68
5.3.200.4130.03014.60
5.3.190.2670.04014.53
5.3.180.4770.03714.38
5.3.170.4000.04014.53
5.3.160.3870.03314.38
5.3.150.4130.03714.56
5.3.140.3800.03014.55
5.3.130.3870.03314.50
5.3.120.3600.04014.52
5.3.110.3500.03714.58
5.3.100.3030.03314.00
5.3.90.3330.04014.05
5.3.80.3370.03314.13
5.3.70.3470.03014.05
5.3.60.2330.03713.96
5.3.50.2270.03713.90
5.3.40.2470.03313.80
5.3.30.1800.03313.86
5.3.20.1400.04013.64
5.3.10.1870.02313.49
5.3.00.1670.03713.59
5.2.170.1000.02711.08
5.2.160.0730.03011.05
5.2.150.1770.02711.09
5.2.140.2400.02311.07
5.2.130.1130.02710.96
5.2.120.1070.03311.04
5.2.110.2100.02711.09
5.2.100.0600.03711.09
5.2.90.1070.03310.93
5.2.80.0600.03011.00
5.2.70.1700.03010.98
5.2.60.1830.02311.04
5.2.50.2630.02710.95
5.2.40.1770.03011.15
5.2.30.2070.02710.94
5.2.20.2770.03010.90
5.2.10.2270.03010.86
5.2.00.1200.03010.76
5.1.60.2400.03310.06
5.1.50.2870.0239.90
5.1.40.2500.0279.98
5.1.30.1170.02710.41
5.1.20.2330.02310.31
5.1.10.0570.0339.98
5.1.00.2230.0239.92
5.0.50.0530.0238.54
5.0.40.0800.0208.31
5.0.30.0470.0438.06
5.0.20.0100.0338.24
5.0.10.0130.0438.19
5.0.00.0170.0508.07
4.4.90.1170.0076.03
4.4.80.0500.0176.04
4.4.70.1500.0206.07
4.4.60.1330.0206.07
4.4.50.1300.0206.08
4.4.40.1300.0236.10
4.4.30.1230.0176.11
4.4.20.1330.0206.11
4.4.10.1770.0176.11
4.4.00.1270.0236.11
4.3.110.0800.0236.11
4.3.100.0170.0276.11
4.3.90.0170.0236.11
4.3.80.0100.0536.11
4.3.70.0130.0206.11
4.3.60.0170.0306.11
4.3.50.0100.0176.11
4.3.40.0130.0236.11
4.3.30.0100.0206.12
4.3.20.0800.0206.14
4.3.10.0930.0176.14
4.3.00.1070.0206.14

preferences:
77.3 ms | 401 KiB | 5 Q