3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lfi_be_gone($userProvided, $basePath) { $real = realpath($userProvided); if ($real === false) { throw new Exception('LOL NOPE'); } if (strpos($real, $basePath) !== 0) { throw new Exception('LOL NOPE'); } return $real; } # Usage: $userProvidedVariable = '../../../../../../../../etc/passwd'; require_once lfi_be_gone("includes/" . $userProvidedVariable, $_SERVER['DOCUMENT_ROOT'] . '/includes/');

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.0080.00816.88
8.3.60.0110.00718.55
8.3.50.0080.01022.04
8.3.40.0040.01118.75
8.3.30.0120.00318.84
8.3.20.0040.00420.34
8.3.10.0030.00620.60
8.3.00.0080.00019.03
8.2.190.0140.00718.30
8.2.180.0150.00316.63
8.2.170.0070.00718.91
8.2.160.0100.00322.96
8.2.150.0050.00325.66
8.2.140.0030.00624.66
8.2.130.0080.00019.36
8.2.120.0070.00026.35
8.2.110.0060.00319.39
8.2.100.0060.00617.75
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0000.00917.75
8.2.60.0030.00518.03
8.2.50.0040.00418.09
8.2.40.0000.00820.40
8.2.30.0000.01019.41
8.2.20.0050.00217.81
8.2.10.0000.01018.00
8.2.00.0070.00018.16
8.1.280.0070.00725.92
8.1.270.0050.00324.66
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0050.00519.21
8.1.230.0040.00817.42
8.1.220.0080.00017.77
8.1.210.0040.00418.77
8.1.200.0000.00917.22
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0050.00318.64
8.1.160.0070.00020.93
8.1.150.0030.00318.89
8.1.140.0000.00719.49
8.1.130.0000.00717.66
8.1.120.0000.00717.46
8.1.110.0070.00017.38
8.1.100.0070.00017.50
8.1.90.0040.00417.35
8.1.80.0000.00717.52
8.1.70.0030.00517.50
8.1.60.0040.00417.61
8.1.50.0080.00017.40
8.1.40.0040.00417.56
8.1.30.0080.00017.66
8.1.20.0040.00417.59
8.1.10.0030.00617.47
8.1.00.0040.00417.56
8.0.300.0030.00518.77
8.0.290.0040.00416.88
8.0.280.0030.00318.56
8.0.270.0060.00317.18
8.0.260.0000.00618.40
8.0.250.0000.00717.04
8.0.240.0060.00317.07
8.0.230.0080.00016.89
8.0.220.0070.00016.91
8.0.210.0000.00716.87
8.0.200.0040.00516.98
8.0.190.0000.00717.05
8.0.180.0050.00216.91
8.0.170.0040.00416.93
8.0.160.0000.00717.01
8.0.150.0040.00416.87
8.0.140.0030.00516.86
8.0.130.0000.00613.34
8.0.120.0000.00816.93
8.0.110.0000.00816.99
8.0.100.0080.00016.80
8.0.90.0000.00716.94
8.0.80.0030.01216.93
8.0.70.0000.00716.82
8.0.60.0000.00816.92
8.0.50.0070.00016.84
8.0.30.0120.00717.16
8.0.20.0080.01017.40
8.0.10.0000.00717.10
8.0.00.0080.01016.75
7.4.330.0020.00216.77
7.4.320.0030.00316.50
7.4.300.0000.00616.64
7.4.290.0070.00016.59
7.4.280.0030.00716.57
7.4.270.0030.00316.37
7.4.260.0050.00316.49
7.4.250.0040.00416.57
7.4.240.0050.00216.59
7.4.230.0000.00716.32
7.4.220.0000.01916.59
7.4.210.0090.00916.55
7.4.200.0040.00416.51
7.4.160.0070.01016.46
7.4.150.0100.01417.40
7.4.140.0130.01117.86
7.4.130.0080.00816.52
7.4.120.0110.00516.56
7.4.110.0160.00616.65
7.4.100.0150.00616.35
7.4.90.0130.00716.38
7.4.80.0110.00719.39
7.4.70.0120.00916.30
7.4.60.0170.00016.50
7.4.50.0090.00616.30
7.4.40.0090.01216.57
7.4.30.0060.01516.46
7.4.10.0080.01114.88
7.4.00.0080.00915.00
7.3.330.0060.00013.29
7.3.320.0030.00313.39
7.3.310.0000.00716.25
7.3.300.0000.00716.30
7.3.290.0080.01116.44
7.3.280.0060.01016.43
7.3.270.0090.00917.40
7.3.260.0170.00016.49
7.3.250.0070.01016.49
7.3.240.0120.00816.59
7.3.230.0150.00316.50
7.3.210.0060.01216.60
7.3.200.0120.00619.39
7.3.190.0120.00316.51
7.3.180.0060.00916.41
7.3.170.0160.00616.46
7.3.160.0040.01116.56
7.3.130.0060.01214.81
7.3.120.0090.00714.95
7.3.110.0080.01014.75
7.3.100.0080.00614.77
7.3.90.0120.00314.88
7.3.80.0030.00914.94
7.3.70.0080.00714.93
7.3.60.0030.00914.73
7.3.50.0080.00714.74
7.3.40.0030.01014.85
7.3.30.0040.01014.85
7.3.20.0080.00816.67
7.3.10.0100.00516.63
7.3.00.0050.00716.77
7.2.330.0140.01016.71
7.2.320.0040.01316.54
7.2.310.0130.00416.79
7.2.300.0060.01216.75
7.2.290.0090.00916.66
7.2.260.0080.01115.25
7.2.250.0100.00915.05
7.2.240.0080.00815.06
7.2.230.0060.00915.25
7.2.220.0040.01015.14
7.2.210.0070.00715.12
7.2.200.0040.00915.15
7.2.190.0070.00815.01
7.2.180.0070.00814.93
7.2.170.0030.01214.97
7.2.160.0060.00615.04
7.2.150.0090.00816.96
7.2.140.0060.00617.09
7.2.130.0070.00616.95
7.2.120.0070.00716.82
7.2.110.0080.00816.87
7.2.100.0080.00816.91
7.2.90.0070.00516.91
7.2.80.0050.00916.98
7.2.70.0070.00716.87
7.2.60.0100.00616.85
7.2.50.0070.00617.00
7.2.40.0020.01216.97
7.2.30.0070.00816.89
7.2.20.0110.00316.93
7.2.10.0050.00516.89
7.2.00.0030.01217.72
7.1.330.0080.00615.79
7.1.320.0070.00715.86
7.1.310.0070.00815.82
7.1.300.0080.00915.79
7.1.290.0050.00615.81
7.1.280.0010.01215.89
7.1.270.0060.00715.71
7.1.260.0020.01015.71
7.1.250.0060.00315.82
7.1.240.0050.01015.88
7.1.230.0030.01115.75
7.1.220.0050.01215.68
7.1.210.0030.00915.81
7.1.200.0060.00815.75
7.1.190.0040.00915.86
7.1.180.0080.00715.73
7.1.170.0050.01015.69
7.1.160.0070.00415.85
7.1.150.0080.00715.85
7.1.140.0050.00815.80
7.1.130.0050.00515.79
7.1.120.0080.00615.86
7.1.110.0050.00915.93
7.1.100.0060.00516.60
7.1.90.0100.00215.84
7.1.80.0070.00615.50
7.1.70.0060.00416.40
7.1.60.0050.01316.99
7.1.50.0060.00816.27
7.1.40.0020.01015.70
7.1.30.0060.00615.82
7.1.20.0110.00215.64
7.1.10.0030.00915.79
7.1.00.0060.03017.86
7.0.330.0050.00815.50
7.0.320.0050.01115.51
7.0.310.0050.00515.36
7.0.300.0040.00815.30
7.0.290.0020.01015.22
7.0.280.0020.01015.18
7.0.270.0050.00715.59
7.0.260.0040.00815.14
7.0.250.0050.00815.51
7.0.240.0050.00715.47
7.0.230.0060.00515.42
7.0.220.0040.00615.56
7.0.210.0020.01215.36
7.0.200.0020.01015.91
7.0.190.0020.01215.23
7.0.180.0050.00515.49
7.0.170.0040.00615.47
7.0.160.0030.01015.46
7.0.150.0050.00815.40
7.0.140.0090.00515.40
7.0.130.0070.00915.45
7.0.120.0060.00615.49
7.0.110.0040.00915.42
7.0.100.0060.00915.41
7.0.90.0020.00915.29
7.0.80.0050.00915.40
7.0.70.0070.00615.41
7.0.60.0180.02816.92
7.0.50.0070.01716.34
7.0.40.0070.02515.78
7.0.30.0120.02015.77
7.0.20.0090.02315.57
7.0.10.0070.03015.72
7.0.00.0040.03615.76
5.6.400.0100.00414.33
5.6.390.0030.01014.58
5.6.380.0080.00614.27
5.6.370.0060.00914.54
5.6.360.0050.00714.52
5.6.350.0050.00914.26
5.6.340.0050.00814.62
5.6.330.0070.00714.56
5.6.320.0040.01114.34
5.6.310.0060.00614.57
5.6.300.0020.01114.52
5.6.290.0060.00914.18
5.6.280.0080.02716.62
5.6.270.0090.00314.34
5.6.260.0060.00914.47
5.6.250.0060.00514.40
5.6.240.0040.00714.39
5.6.230.0080.00814.35
5.6.220.0030.00914.51
5.6.210.0030.03516.47
5.6.200.0080.02615.70
5.6.190.0040.02016.31
5.6.180.0120.03316.39
5.6.170.0080.03416.52
5.6.160.0030.02116.48
5.6.150.0070.03015.71
5.6.140.0020.03015.64
5.6.130.0090.01815.63
5.6.120.0070.03316.59
5.6.110.0090.02616.59
5.6.100.0060.01816.58
5.6.90.0090.02816.45
5.6.80.0070.03116.37
5.6.70.0040.01114.52
5.6.60.0050.00814.21
5.6.50.0080.00514.28
5.6.40.0100.00614.32
5.6.30.0110.00414.31
5.6.20.0050.00714.36
5.6.10.0060.00814.34
5.6.00.0080.00814.27
5.5.380.0010.00914.23
5.5.370.0040.01414.43
5.5.360.0060.00814.27
5.5.350.1490.01516.38
5.5.340.0060.01915.64
5.5.330.0070.02216.31
5.5.320.0230.03116.16
5.5.310.0170.01716.39
5.5.300.0070.03415.51
5.5.290.0070.02415.42
5.5.280.0110.03316.31
5.5.270.0080.03216.35
5.5.260.0100.01916.46
5.5.250.0090.03016.36
5.5.240.0090.03416.28
5.5.230.0090.01013.96
5.5.220.0050.01214.23
5.5.210.0050.01214.30
5.5.200.0060.01114.35
5.5.190.0050.01113.96
5.5.180.0050.01214.30
5.5.170.0090.01014.33
5.5.160.0050.01214.29
5.5.150.0090.01014.02
5.5.140.0050.01113.76
5.5.130.0070.00613.98
5.5.120.0070.00814.25
5.5.110.0100.00414.15
5.5.100.0060.01014.11
5.5.90.0060.01014.13
5.5.80.0050.00814.26
5.5.70.0080.00614.34
5.5.60.0050.00914.25
5.5.50.0060.00714.23
5.5.40.0070.00614.36
5.5.30.0070.00714.12
5.5.20.0040.00614.36
5.5.10.0040.00714.13
5.5.00.0040.00614.19

preferences:
52.06 ms | 401 KiB | 5 Q