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('http://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.40.0080.00819.32
8.3.30.0040.01219.32
8.3.20.0060.00319.37
8.3.10.0030.00619.35
8.3.00.0130.00319.88
8.2.170.0100.01322.96
8.2.160.0090.00621.27
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00021.39
8.2.110.0030.00620.63
8.2.100.0060.00618.22
8.2.90.0030.00519.34
8.2.80.0000.00818.00
8.2.70.0030.00617.75
8.2.60.0080.00018.05
8.2.50.0000.00818.07
8.2.40.0040.00418.28
8.2.30.0040.00418.34
8.2.20.0030.00618.22
8.2.10.0040.00418.21
8.2.00.0030.00518.19
8.1.270.0050.00324.66
8.1.260.0050.00326.35
8.1.250.0090.00028.09
8.1.240.0060.00322.50
8.1.230.0070.00417.83
8.1.220.0040.00418.13
8.1.210.0000.00818.77
8.1.200.0030.00717.48
8.1.190.0000.00817.78
8.1.180.0030.00618.10
8.1.170.0080.00019.07
8.1.160.0060.00319.13
8.1.150.0080.00018.99
8.1.140.0070.00017.77
8.1.130.0030.00518.12
8.1.120.0090.00017.70
8.1.110.0030.00617.75
8.1.100.0000.00817.79
8.1.90.0040.00417.79
8.1.80.0070.00017.62
8.1.70.0000.00717.65
8.1.60.0060.00617.88
8.1.50.0050.00317.91
8.1.40.0000.00917.84
8.1.30.0060.00317.86
8.1.20.0090.00017.86
8.1.10.0000.00817.86
8.1.00.0030.00517.80
8.0.300.0000.00918.77
8.0.290.0030.00517.25
8.0.280.0040.00418.82
8.0.270.0040.00417.64
8.0.260.0040.00417.30
8.0.250.0080.00017.47
8.0.240.0040.00417.37
8.0.230.0000.00817.49
8.0.220.0000.00717.31
8.0.210.0040.00417.29
8.0.200.0000.00717.50
8.0.190.0040.00417.40
8.0.180.0070.00317.34
8.0.170.0030.00617.32
8.0.160.0000.00717.38
8.0.150.0040.00417.24
8.0.140.0100.00017.14
8.0.130.0030.00313.85
8.0.120.0050.00317.37
8.0.110.0000.00817.41
8.0.100.0030.00617.39
8.0.90.0040.00417.48
8.0.80.0070.01117.39
8.0.70.0000.00817.29
8.0.60.0040.00417.37
8.0.50.0030.00517.32
8.0.30.0130.00617.46
8.0.20.0140.00617.52
8.0.10.0080.00017.48
8.0.00.0110.00917.16
7.4.330.0050.00013.49
7.4.320.0030.00316.78
7.4.300.0000.00817.03
7.4.290.0040.00416.95
7.4.280.0000.00716.88
7.4.270.0040.00416.78
7.4.260.0000.00613.79
7.4.250.0040.00417.07
7.4.240.0040.00317.08
7.4.230.0000.00716.98
7.4.220.0060.01916.90
7.4.210.0090.00917.07
7.4.200.0030.00517.12
7.4.190.0040.00417.11
7.4.160.0060.01216.98
7.4.150.0090.00917.13
7.4.140.0120.00817.10
7.4.130.0120.00717.07
7.4.120.0090.00916.89
7.4.110.0110.00817.07
7.4.100.0080.01216.96
7.4.90.0030.01717.03
7.4.80.0090.00919.39
7.4.70.0120.01216.92
7.4.60.0070.01017.02
7.4.50.0070.00716.93
7.4.40.0040.01417.16
7.4.30.0090.00916.91
7.4.00.0070.01015.41
7.3.330.0030.00313.78
7.3.320.0060.00213.79
7.3.310.0040.00416.70
7.3.300.0000.00716.66
7.3.290.0130.00916.87
7.3.280.0110.00816.81
7.3.270.0080.01117.07
7.3.260.0110.01116.82
7.3.250.0150.00816.84
7.3.240.0030.01516.94
7.3.230.0030.01417.02
7.3.210.0090.01216.86
7.3.200.0060.01216.91
7.3.190.0030.01616.92
7.3.180.0130.01016.94
7.3.170.0060.01216.77
7.3.160.0070.01016.89
7.3.120.0070.00415.55
7.2.330.0160.00317.02
7.2.320.0070.01117.17
7.2.310.0120.00817.11
7.2.300.0110.01416.95
7.2.290.0110.00717.13
7.2.60.0000.01617.50
7.2.00.0340.00420.05
7.1.200.0060.01015.93
7.1.100.0000.01218.46
7.1.70.0000.01617.74
7.1.60.0120.01219.40
7.1.50.0060.00617.40
7.1.00.0070.06722.82
7.0.200.0040.00416.89
7.0.140.0100.07022.33
7.0.120.0000.07022.37
7.0.60.0030.08720.37
7.0.50.0130.04718.27
7.0.40.0070.08720.51
7.0.30.0200.08720.57
7.0.20.0430.07720.52
7.0.10.0100.08320.64
7.0.00.0070.07320.58
5.6.280.0070.07321.43
5.6.210.0030.04320.80
5.6.200.0070.08718.39
5.6.190.0070.08721.01
5.6.180.0400.03721.03
5.6.170.0270.08320.83
5.6.160.0130.08020.98
5.6.150.0000.06018.66
5.6.140.0100.03718.51
5.6.130.0130.07318.56
5.6.120.0130.07021.43
5.6.110.0130.07021.38
5.6.100.0100.07721.36
5.6.90.0030.08721.32
5.6.80.0070.08320.67
5.5.350.0200.07720.82
5.5.340.0030.05018.54
5.5.330.0030.08720.89
5.5.320.0500.05020.58
5.5.310.0200.04720.61
5.5.300.0070.03718.27
5.5.290.0100.05318.40
5.5.280.0100.04721.16
5.5.270.0030.08721.24
5.5.260.0200.07021.24
5.5.250.0000.04320.97
5.5.240.0130.06720.59
5.4.450.0030.05019.88
5.4.440.0030.05019.94
5.4.430.0030.04319.91
5.4.420.0000.04319.98
5.4.410.0070.05719.79
5.4.400.0000.04319.43
5.4.390.0130.06019.75
5.4.380.0070.06719.59
5.4.370.0130.06719.54
5.4.360.0030.05019.59
5.4.350.0170.03719.69
5.4.340.0100.08019.70
5.4.320.0000.04319.84
5.4.310.0030.03719.74
5.4.300.0070.07719.77
5.4.290.0100.07019.74
5.4.280.0000.08719.63
5.4.270.0230.06019.67
5.4.260.0070.05019.66
5.4.250.0070.08019.68
5.4.240.0000.06019.54
5.4.230.0100.07719.45
5.4.220.0070.03719.65
5.4.210.0030.04319.84
5.4.200.0000.07319.73
5.4.190.0030.04019.68
5.4.180.0030.08019.72
5.4.170.0070.03719.83
5.4.160.0030.05019.58
5.4.150.0070.03719.76
5.4.140.0030.07716.88
5.4.130.0070.07316.97
5.4.120.0170.04717.11
5.4.110.0030.05717.00
5.4.100.0030.03717.13
5.4.90.0070.03316.88
5.4.80.0070.04317.23
5.4.70.0070.04016.87
5.4.60.0100.06317.06
5.4.50.0000.04016.93
5.4.40.0100.03016.98
5.4.30.0030.06316.92
5.4.20.0170.04316.98
5.4.10.0170.04016.93
5.4.00.0130.04016.42
5.3.290.0000.04315.15
5.3.280.0030.08315.01
5.3.270.0030.04014.91
5.3.260.0030.04314.92
5.3.250.0030.06315.07
5.3.240.0070.05015.02
5.3.230.0100.06315.02
5.3.220.0070.04714.98
5.3.210.0100.07315.02
5.3.200.0100.03315.02
5.3.190.0100.07014.96
5.3.180.0100.07314.88
5.3.170.0030.05014.96
5.3.160.0070.03714.85
5.3.150.0170.03314.86
5.3.140.0070.03714.99
5.3.130.0000.06314.98
5.3.120.0070.06714.86
5.3.110.0070.06014.84
5.3.100.0070.08014.47
5.3.90.0100.05314.30
5.3.80.0030.05014.32
5.3.70.0030.04714.34
5.3.60.0030.04014.46
5.3.50.0070.04014.21
5.3.40.0130.03314.41
5.3.30.0100.05014.24
5.3.20.0100.06714.13
5.3.10.0030.07313.96
5.3.00.0000.05714.11
5.2.170.0030.06311.09
5.2.160.0100.03011.08
5.2.150.0030.04011.14
5.2.140.0000.04311.09
5.2.130.0030.03011.05
5.2.120.0030.04011.27
5.2.110.0100.03011.09
5.2.100.0070.05011.02
5.2.90.0070.05011.05
5.2.80.0000.03311.20
5.2.70.0070.03011.07
5.2.60.0000.03310.95
5.2.50.0100.04710.96
5.2.40.0000.04710.95
5.2.30.0070.05710.80
5.2.20.0000.06310.92
5.2.10.0030.06310.74
5.2.00.0030.06010.77
5.1.60.0070.0239.91
5.1.50.0000.0409.99
5.1.40.0070.03710.03
5.1.30.0000.03010.34
5.1.20.0030.02710.36
5.1.10.0030.03010.15
5.1.00.0000.0309.92
5.0.50.0070.0408.54
5.0.40.0130.0408.56
5.0.30.0070.0638.23
5.0.20.0030.0238.23
5.0.10.0030.0208.23
5.0.00.0000.0408.23
4.4.90.0000.0208.23
4.4.80.0030.0308.23
4.4.70.0000.0378.23
4.4.60.0000.0278.23
4.4.50.0030.0138.23
4.4.40.0030.0278.23
4.4.30.0070.0278.23
4.4.20.0070.0138.23
4.4.10.0000.0278.23
4.4.00.0030.0238.23
4.3.110.0070.0278.23
4.3.100.0000.0308.23
4.3.90.0000.0178.23
4.3.80.0000.0308.23
4.3.70.0030.0238.23
4.3.60.0030.0138.23
4.3.50.0030.0138.23
4.3.40.0030.0508.23
4.3.30.0030.0178.23
4.3.20.0030.0178.23
4.3.10.0000.0208.23
4.3.00.0000.0178.23

preferences:
47.36 ms | 400 KiB | 5 Q