3v4l.org

run code in 300+ PHP versions simultaneously
<?php // uncomment these to see what happens in different situations. // note that this only handles file security; it DOES NOT stop me from reading your files, or vice-versa. $_GET = ['user' => '__adrian', 'file' => 'foo.txt']; //$_GET = ['user' => '__adrian', 'file' => 'remote-file-inclusion.exe']; //$_GET = ['user' => 'UnicornTek', 'file' => 'filesystems-tutorial.pdf']; //$_GET = ['user' => 'UnicornTek', 'file' => 'bar.txt']; $allowed_files = [ '__adrian' => [ 'foo.txt', 'bar.png' ], 'UnicornTek' => [ 'filesystems-turoial.pdf', 'remote-file-inclusion.exe' ] ]; if (! isset($allowed_files[$_GET['user']]) || ! in_array($_GET['file'], $allowed_files[$_GET['user']])) { throw new Exception("File Not Found: {$_GET['user']}/{$_GET['file']}"); } readfile("/path/to/users/{$_GET['user']}/{$_GET['file']}");

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.4.20.0080.00019.68
8.4.10.0140.00717.77
8.3.150.0150.00416.64
8.3.140.0060.00917.30
8.3.130.0030.00618.57
8.3.120.0040.00718.79
8.3.110.0060.00320.94
8.3.100.0030.00718.32
8.3.90.0080.00026.77
8.3.80.0090.00018.56
8.3.70.0140.00718.47
8.3.60.0120.00618.55
8.3.50.0070.01018.37
8.3.40.0140.00418.82
8.3.30.0070.00718.84
8.3.20.0080.00019.02
8.3.10.0080.00021.62
8.3.00.0070.00723.53
8.2.270.0160.00317.36
8.2.260.0090.00018.76
8.2.250.0050.00316.89
8.2.240.0090.00017.20
8.2.230.0040.00422.58
8.2.220.0090.00024.06
8.2.210.0080.00026.77
8.2.200.0030.00616.63
8.2.190.0060.00917.00
8.2.180.0120.00916.75
8.2.170.0140.00319.21
8.2.160.0100.00322.96
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00719.95
8.2.120.0040.00426.35
8.2.110.0060.00320.21
8.2.100.0110.00419.63
8.2.90.0030.00717.88
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0050.00317.63
8.2.50.0000.00917.63
8.2.40.0030.00721.20
8.2.30.0040.00419.28
8.2.20.0000.00818.15
8.2.10.0040.00419.32
8.2.00.0050.00219.48
8.1.310.0040.00418.54
8.1.300.0070.00717.73
8.1.290.0060.00630.84
8.1.280.0130.00625.92
8.1.270.0050.00322.15
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0090.00020.87
8.1.230.0130.00017.60
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.10
8.1.180.0060.00318.10
8.1.170.0040.00418.87
8.1.160.0050.00218.95
8.1.150.0000.00818.89
8.1.140.0000.00717.75
8.1.130.0000.00719.03
8.1.120.0000.00717.47
8.1.110.0030.00517.36
8.1.100.0050.00217.43
8.1.90.0040.00417.46
8.1.80.0000.00717.48
8.1.70.0040.00417.40
8.1.60.0030.00717.47
8.1.50.0040.00417.59
8.1.40.0080.00017.53
8.1.30.0000.00817.71
8.1.20.0030.00617.70
8.1.10.0050.00217.52
8.1.00.0030.00617.41
8.0.300.0030.00618.77
8.0.290.0040.00416.88
8.0.280.0030.00318.57
8.0.270.0080.00017.33
8.0.260.0060.00017.34
8.0.250.0100.00016.96
8.0.240.0050.00316.96
8.0.230.0030.00316.95
8.0.220.0050.00317.00
8.0.210.0070.00017.09
8.0.200.0000.00617.12
8.0.190.0000.00917.09
8.0.180.0000.00817.12
8.0.170.0030.00617.06
8.0.160.0030.00316.98
8.0.150.0070.00016.96
8.0.140.0070.00017.05
8.0.130.0060.00013.42
8.0.120.0040.00416.96
8.0.110.0040.00416.93
8.0.100.0040.00416.99
8.0.90.0070.00017.06
8.0.80.0070.00917.03
8.0.70.0070.00017.04
8.0.60.0070.00016.95
8.0.50.0040.00416.91
8.0.30.0100.00917.23
8.0.20.0100.01217.40
8.0.10.0030.00616.90
8.0.00.0070.01316.86
7.4.330.0040.00015.55
7.4.320.0000.00716.63
7.4.300.0030.00316.51
7.4.290.0060.00316.61
7.4.280.0050.00316.51
7.4.270.0070.00016.44
7.4.260.0080.00316.49
7.4.250.0040.00416.53
7.4.240.0030.00316.54
7.4.230.0030.00316.61
7.4.220.0030.00516.38
7.4.210.0090.00716.62
7.4.200.0000.00716.62
7.4.160.0110.00716.59
7.4.140.0120.00917.86
7.4.130.0100.00716.54
7.4.120.0110.00816.59
7.4.110.0080.00916.52
7.4.100.0110.01116.60
7.4.90.0090.00916.73
7.4.80.0210.00319.39
7.4.70.0100.01016.74
7.4.60.0070.01616.67
7.4.50.0040.00816.51
7.4.40.0120.00616.48
7.4.00.0050.01314.93
7.3.330.0050.00013.33
7.3.320.0030.00313.21
7.3.310.0030.00316.50
7.3.300.0060.00016.32
7.3.290.0000.00716.37
7.3.280.0070.01016.47
7.3.260.0070.01216.43
7.3.240.0100.00916.43
7.3.230.0120.00616.54
7.3.210.0090.00916.31
7.3.200.0100.00716.24
7.3.190.0130.00916.32
7.3.180.0130.00316.64
7.3.170.0100.00716.49
7.3.160.0110.00716.38
7.3.120.0060.00914.64
7.3.110.0080.00914.98
7.3.100.0110.00414.87
7.3.90.0030.01014.92
7.3.80.0040.00814.83
7.3.70.0060.00614.69
7.3.60.0040.01114.90
7.3.50.0090.00314.63
7.3.40.0030.00714.88
7.3.30.0150.00014.79
7.3.20.0030.01316.73
7.3.10.0030.01316.80
7.3.00.0060.00616.65
7.2.330.0070.01116.46
7.2.320.0100.00716.32
7.2.310.0070.01016.43
7.2.300.0130.00416.42
7.2.290.0190.00416.44
7.2.250.0160.00314.84
7.2.240.0040.01514.99
7.2.230.0090.00614.97
7.2.220.0080.00415.14
7.2.210.0070.00715.09
7.2.200.0000.01715.11
7.2.190.0070.00715.21
7.2.180.0040.01114.73
7.2.170.0060.00615.06
7.2.160.0060.00614.73
7.2.150.0000.01616.99
7.2.140.0030.01016.85
7.2.130.0070.00317.03
7.2.120.0080.00816.93
7.2.110.0070.01016.98
7.2.100.0070.01016.79
7.2.90.0030.01017.02
7.2.80.0050.00916.69
7.2.70.0190.00715.60
7.2.60.0200.01015.70
7.2.50.0170.00815.44
7.2.40.0150.01115.51
7.2.30.0170.00815.59
7.2.20.0180.00915.54
7.2.10.0170.00715.68
7.2.00.0150.01215.47
7.1.330.0030.01315.96
7.1.320.0100.00615.78
7.1.310.0060.00615.73
7.1.300.0050.00515.91
7.1.290.0100.00315.91
7.1.280.0090.00615.80
7.1.270.0040.00715.87
7.1.260.0120.00315.80
7.1.250.0070.01015.82
7.1.240.0000.01715.63
7.1.230.0100.00615.75
7.1.220.0070.00315.68
7.1.210.0030.01115.78
7.1.200.0070.00415.81
7.1.190.0030.01315.71
7.1.180.0040.00415.77
7.1.170.0160.01014.46
7.1.160.0150.01014.47
7.1.150.0120.01314.44
7.1.140.0260.00814.51
7.1.130.0280.00714.46
7.1.120.0130.00814.41
7.1.110.0130.00914.37
7.1.100.0200.00714.36
7.1.90.0190.00714.46
7.1.80.0160.01014.52
7.1.70.0190.00914.52
7.1.60.0350.00526.48
7.1.50.0260.01326.39
7.1.40.0300.01226.50
7.1.30.0280.01026.32
7.1.20.0310.01126.44
7.1.10.0540.01114.36
7.1.00.0160.00814.35
7.0.330.0100.00315.41
7.0.320.0050.00515.34
7.0.310.0040.00815.14
7.0.300.0000.01715.07
7.0.290.0060.01215.52
7.0.280.0040.00815.35
7.0.270.0030.01015.44
7.0.260.0040.01115.45
7.0.250.0030.01215.43
7.0.240.0030.00715.35
7.0.230.0000.01215.50
7.0.220.0100.00015.49
7.0.210.0030.00915.05
7.0.200.0040.00415.46
7.0.190.0060.00915.40
7.0.180.0040.00415.53
7.0.170.0060.00615.49
7.0.160.0070.00715.22
7.0.150.0030.00615.35
7.0.140.0070.00715.11
7.0.130.0030.00515.52
7.0.120.0070.00415.25
7.0.110.0040.00715.42
7.0.100.0060.00715.46
7.0.90.0040.00815.29
7.0.80.0090.00415.30
7.0.70.0000.00815.18
7.0.60.0080.00415.51
7.0.50.0000.01315.63
7.0.40.0040.00713.60
7.0.30.0030.01013.51
7.0.20.0060.00913.61
7.0.10.0030.00913.28
7.0.00.0000.00813.50
5.6.400.0070.00714.79
5.6.390.0000.01814.14
5.6.380.0040.00414.07
5.6.370.0040.00714.14
5.6.360.0040.01414.66
5.6.350.0120.00314.31
5.6.340.0000.01714.76
5.6.330.0060.00914.41
5.6.320.0080.00314.27
5.6.310.0060.00914.37
5.6.300.0070.00314.23
5.6.290.0120.00314.57
5.6.280.0030.01014.38
5.6.270.0000.01314.32
5.6.260.0060.00614.38
5.6.250.0090.00314.49
5.6.240.0070.01014.35
5.6.230.0050.00514.20
5.6.220.0070.00414.25
5.6.210.0000.01114.40
5.6.200.0030.01014.55
5.6.190.0070.01014.73
5.6.180.0030.01014.26
5.6.170.0100.00314.24
5.6.160.0060.00614.25
5.6.150.0060.00614.33
5.6.140.0080.00314.25
5.6.130.0120.00014.50
5.6.120.0060.00314.43
5.6.110.0110.00414.32
5.6.100.0060.01014.33
5.6.90.0030.00714.51
5.6.80.0040.01114.33
5.6.70.0100.00314.32
5.6.60.0070.00714.57
5.6.50.0100.00714.24
5.6.40.0040.00814.30
5.6.30.0060.00314.55
5.6.20.0100.00314.26
5.6.10.0000.01214.37
5.6.00.0030.01414.27

preferences:
30.42 ms | 403 KiB | 5 Q