3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allowed = array('txt', 'docx'); $zzfile = "flag.\x0a\xe2x08php"; $filename = $zzfile; print "\nfilename:\n"; var_dump($filename); if (preg_match('#\.(.+)$#', $filename, $matches) && isset($matches[1]) && !in_array($matches[1], $allowed)) die("Extension ${matches[1]} is not allowed!"); echo "\nmatches:"; var_dump($matches); if (strrpos($filename, '.') !== false) //zwraca od pierwszej kropki od prawej do konca + end $ext = substr($filename, strrpos($filename, '.')); else $ext = ''; $newfile = "flag$ext"; print $newfile; echo "Reading <strong>$newfile</strong>..."; // Hint: the flag is in flag.php echo '<pre>'; readfile($newfile); echo '</pre>'; ?>

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.0120.00917.86
8.4.10.0180.00417.88
8.3.140.0090.00617.41
8.3.130.0040.01118.57
8.3.120.0060.00318.98
8.3.110.0050.00520.94
8.3.100.0030.00624.06
8.3.90.0060.00326.77
8.3.80.0030.00617.97
8.3.70.0090.00618.68
8.3.60.0110.01117.13
8.3.50.0120.01021.20
8.3.40.0120.00318.90
8.3.30.0070.00718.85
8.3.20.0040.00420.36
8.3.10.0080.00021.71
8.3.00.0040.00421.90
8.2.260.0090.00616.64
8.2.250.0040.00416.69
8.2.240.0030.00617.25
8.2.230.0060.00322.58
8.2.220.0060.00337.54
8.2.210.0120.00326.77
8.2.200.0030.00616.88
8.2.190.0200.00016.88
8.2.180.0110.00718.55
8.2.170.0040.01122.96
8.2.160.0100.00320.53
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00421.13
8.2.120.0070.00026.35
8.2.110.0030.00619.33
8.2.100.0060.00617.93
8.2.90.0050.00319.27
8.2.80.0060.00317.97
8.2.70.0060.00317.75
8.2.60.0050.00317.79
8.2.50.0050.00318.09
8.2.40.0060.00322.30
8.2.30.0050.00219.54
8.2.20.0040.00417.81
8.2.10.0000.00718.04
8.2.00.0000.00718.19
8.1.310.0000.01016.65
8.1.300.0060.00318.44
8.1.290.0060.00330.84
8.1.280.0150.00825.92
8.1.270.0100.01021.98
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00619.33
8.1.230.0110.00017.77
8.1.220.0050.00317.75
8.1.210.0030.00518.77
8.1.200.0030.00617.48
8.1.190.0000.00817.35
8.1.180.0080.00018.10
8.1.170.0050.00318.61
8.1.160.0000.00720.67
8.1.150.0040.00420.74
8.1.140.0000.00819.61
8.1.130.0030.00317.73
8.1.120.0040.00417.70
8.1.110.0070.00017.52
8.1.100.0000.00817.59
8.1.90.0040.00417.63
8.1.80.0050.00317.68
8.1.70.0000.00717.58
8.1.60.0060.00317.80
8.1.50.0040.00417.52
8.1.40.0030.00517.71
8.1.30.0000.00817.84
8.1.20.0000.00717.71
8.1.10.0000.00817.69
8.1.00.0000.00917.57
8.0.300.0040.00418.84
8.0.290.0050.00216.88
8.0.280.0000.00718.55
8.0.270.0030.00517.35
8.0.260.0000.00617.35
8.0.250.0070.00017.23
8.0.240.0050.00317.11
8.0.230.0030.00317.22
8.0.220.0080.00017.21
8.0.210.0000.00717.21
8.0.200.0070.00017.16
8.0.190.0030.00517.29
8.0.180.0070.00017.19
8.0.170.0000.00817.20
8.0.160.0040.00417.11
8.0.150.0000.00716.98
8.0.140.0000.00717.11
8.0.130.0030.00313.59
8.0.120.0080.00017.06
8.0.110.0000.00817.09
8.0.100.0000.00817.06
8.0.90.0040.00417.05
8.0.80.0070.01017.19
8.0.70.0020.00517.06
8.0.60.0030.00617.24
8.0.50.0040.00417.23
8.0.30.0050.01417.37
8.0.20.0120.00717.44
8.0.10.0060.00317.27
8.0.00.0120.00616.92
7.4.330.0020.00216.75
7.4.320.0070.00016.82
7.4.300.0050.00316.73
7.4.290.0030.00316.75
7.4.280.0090.00016.80
7.4.270.0030.00316.71
7.4.260.0070.00016.74
7.4.250.0070.00016.68
7.4.240.0040.00416.84
7.4.230.0030.00316.63
7.4.220.0040.01416.74
7.4.210.0050.01116.81
7.4.200.0040.00416.80
7.4.160.0090.00916.91
7.4.150.0110.00917.40
7.4.140.0120.00817.86
7.4.130.0110.00916.85
7.4.120.0110.00816.77
7.4.110.0130.00916.74
7.4.100.0100.00716.61
7.4.90.0150.00316.77
7.4.80.0060.01219.39
7.4.70.0110.00616.57
7.4.60.0100.00616.66
7.4.50.0070.00716.48
7.4.40.0100.00816.73
7.4.30.0070.01616.54
7.4.00.0100.00315.32
7.3.330.0060.00013.43
7.3.320.0070.00013.36
7.3.310.0030.00316.67
7.3.300.0000.00716.51
7.3.290.0110.00616.58
7.3.280.0120.00716.62
7.3.270.0070.01117.40
7.3.260.0130.00316.63
7.3.240.0120.00916.69
7.3.230.0090.00916.64
7.3.210.0090.00916.82
7.3.200.0140.00319.39
7.3.190.0040.01216.69
7.3.180.0100.00716.74
7.3.170.0090.01516.59
7.3.160.0090.01516.60
7.2.330.0110.00716.71
7.2.320.0000.01816.82
7.2.310.0070.01616.67
7.2.300.0100.00716.84
7.2.290.0090.00916.70
7.2.60.0040.01117.05
7.2.00.0040.00819.24
7.1.200.0030.01016.19
7.1.100.0040.01118.23
7.1.70.0000.00717.42
7.1.60.0030.00717.16
7.1.50.0030.00917.16
7.1.40.0090.00416.70
7.1.30.0090.00316.73
7.1.20.0090.00317.21
7.1.10.0030.00716.73
7.1.00.0030.00917.02
7.0.200.0070.00016.65
7.0.190.0000.00716.88
7.0.180.0100.00316.32
7.0.170.0030.00516.51
7.0.160.0000.00816.41
7.0.150.0030.00916.59
7.0.140.0060.00816.57
7.0.130.0110.00416.89
7.0.120.0090.00616.79
7.0.110.0070.00716.55
7.0.100.0030.00616.79
7.0.90.0040.00416.75
7.0.80.0050.00516.86
7.0.70.0000.01616.50
7.0.60.0050.00216.48
7.0.50.0060.01116.70
7.0.40.0030.01716.10
7.0.30.0070.00716.10
7.0.20.0000.00816.10
7.0.10.0090.00016.10
7.0.00.0020.00516.10
5.6.300.0000.05520.79
5.6.290.0000.04320.99
5.6.280.0060.04121.04
5.6.270.0070.06920.81
5.6.260.0030.05421.03
5.6.250.0000.04720.76
5.6.240.0070.07020.82
5.6.230.0030.04820.95
5.6.220.0070.03920.78
5.6.210.0070.06321.00
5.6.200.0030.04520.86
5.6.190.0030.05020.86
5.6.180.0030.07720.79
5.6.170.0000.04821.03
5.6.160.0000.04521.02
5.6.150.0000.04521.02
5.6.140.0100.04820.84
5.6.130.0030.04620.81
5.6.120.0000.05320.92
5.6.110.0000.04620.91
5.6.100.0070.05520.80
5.6.90.0030.06920.94
5.6.80.0000.04320.24
5.6.70.0000.05020.20
5.6.60.0000.05220.26
5.6.50.0070.08120.15
5.6.40.0100.06220.21
5.6.30.0000.04620.09
5.6.20.0130.06520.38
5.6.10.0000.04320.18
5.6.00.0130.03220.31
5.5.380.0070.03517.57
5.5.370.0030.03917.58
5.5.360.0030.04017.48
5.5.350.0060.08117.49
5.5.340.0070.03617.95
5.5.330.0070.05617.71
5.5.320.0030.06018.03
5.5.310.0030.06518.11
5.5.300.0070.04617.95
5.5.290.0030.04317.98
5.5.280.0030.04018.02
5.5.270.0000.04317.85
5.5.260.0030.08118.01
5.5.250.0030.05617.84
5.5.240.0000.04117.41
5.5.230.0000.04417.44
5.5.220.0000.04317.40
5.5.210.0000.05417.32
5.5.200.0060.03817.10
5.5.190.0000.04117.38
5.5.180.0030.08017.35
5.5.160.0060.03817.21
5.5.150.0060.04817.39
5.5.140.0030.03717.31
5.5.130.0030.03617.09
5.5.120.0030.05717.05
5.5.110.0100.05817.39
5.5.100.0070.05317.38
5.5.90.0000.08617.31
5.5.80.0070.06017.09
5.5.70.0030.03817.27
5.5.60.0070.05417.20
5.5.50.0000.05117.27
5.5.40.0100.07416.98
5.5.30.0030.05717.07
5.5.20.0030.08117.30
5.5.10.0000.04217.25
5.5.00.0030.08217.28
5.4.450.0030.04819.40
5.4.440.0070.04619.18
5.4.430.0040.03919.42
5.4.420.0000.04719.18
5.4.410.0130.07519.27
5.4.400.0030.03518.89
5.4.390.0000.04019.07
5.4.380.0000.06119.14
5.4.370.0000.03919.08
5.4.360.0000.04219.00
5.4.350.0030.03718.82
5.4.340.0000.05519.02
5.4.320.0040.03919.02
5.4.310.0060.04419.10
5.4.300.0000.05319.04
5.4.290.0030.06219.06
5.4.280.0030.06719.07
5.4.270.0030.06618.97
5.4.260.0000.08219.05
5.4.250.0040.03918.91
5.4.240.0130.03818.84
5.4.230.0070.05519.07
5.4.220.0040.04619.09
5.4.210.0070.07919.05
5.4.200.0060.06818.84
5.4.190.0030.04118.90
5.4.180.0030.06019.13
5.4.170.0070.07118.81
5.4.160.0030.04218.96
5.4.150.0030.05118.89
5.4.140.0070.04016.39
5.4.130.0030.03916.53
5.4.120.0000.05016.55
5.4.110.0070.06616.66
5.4.100.0060.06116.63
5.4.90.0040.04216.66
5.4.80.0000.04116.67
5.4.70.0030.03816.49
5.4.60.0030.03416.39
5.4.50.0000.03716.61
5.4.40.0030.03316.69
5.4.30.0070.03416.41
5.4.20.0070.04616.54
5.4.10.0000.04016.43
5.4.00.0000.03816.10
5.3.290.0030.03716.10
5.3.280.0070.07716.10
5.3.270.0030.07916.10
5.3.260.0070.03716.10
5.3.250.0070.03716.10
5.3.240.0030.03716.10
5.3.230.0000.04216.10
5.3.220.0030.06716.10
5.3.210.0060.06216.10
5.3.200.0000.04116.10
5.3.190.0140.02716.10
5.3.180.0140.03816.10
5.3.170.0070.03616.10
5.3.160.0000.04216.10
5.3.150.0130.03316.10
5.3.140.0040.03616.10
5.3.130.0100.04316.10
5.3.120.0070.03616.10
5.3.110.0000.04216.10
5.3.100.0130.04016.10
5.3.90.0000.04216.10
5.3.80.0000.04116.10
5.3.70.0030.03516.10
5.3.60.0030.06616.10
5.3.50.0030.03616.10
5.3.40.0000.03616.10
5.3.30.0000.04516.10
5.3.20.0000.03816.10
5.3.10.0030.03516.10
5.3.00.0000.05816.10
5.2.170.0030.05416.10
5.2.160.0000.06816.10
5.2.150.0030.04716.10
5.2.140.0030.03116.10
5.2.130.0030.02916.10
5.2.120.0060.05016.10
5.2.110.0030.02816.10
5.2.100.0030.02916.10
5.2.90.0000.03316.10
5.2.80.0070.02716.10
5.2.70.0040.03216.10
5.2.60.0070.02416.10
5.2.50.0030.03916.10
5.2.40.0030.02816.10
5.2.30.0040.02916.10
5.2.20.0030.02816.10
5.2.10.0030.02916.10
5.2.00.0000.06816.10
5.1.60.0090.02516.10
5.1.50.0040.02316.10
5.1.40.0100.02616.10
5.1.30.0000.04216.10
5.1.20.0000.03216.10
5.1.10.0030.02716.10
5.1.00.0030.02716.10
5.0.50.0060.01716.10
5.0.40.0060.02716.10
5.0.30.0000.03416.10
5.0.20.0040.01916.10
5.0.10.0090.01216.10
5.0.00.0000.03316.10
4.4.90.0050.01316.10
4.4.80.0040.02316.10
4.4.70.0030.02416.10
4.4.60.0060.02516.10
4.4.50.0000.01816.10
4.4.40.0040.02516.10
4.4.30.0000.02116.10
4.4.20.0030.01516.10
4.4.10.0060.01116.10
4.4.00.0060.02716.10
4.3.110.0000.03116.10
4.3.100.0000.01816.10
4.3.90.0000.02016.10
4.3.80.0060.01916.10
4.3.70.0030.01416.10
4.3.60.0000.01616.10
4.3.50.0070.01716.10
4.3.40.0040.03216.10
4.3.30.0070.03516.10
4.3.20.0030.03016.10
4.3.10.0060.01816.10
4.3.00.0060.03116.10

preferences:
20.78 ms | 403 KiB | 5 Q