3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allowed = array('txt', 'docx'); $zzfile = "flag.%0a%e2%90%A4%09%08php"; $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.3.60.0070.01116.75
8.3.50.0130.00521.28
8.3.40.0140.00719.09
8.3.30.0120.00318.79
8.3.20.0040.00420.24
8.3.10.0000.00821.86
8.3.00.0050.00321.85
8.2.180.0120.00316.88
8.2.170.0070.00722.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0080.00021.00
8.2.120.0080.00026.35
8.2.110.0090.00019.23
8.2.100.0080.00418.16
8.2.90.0000.00819.30
8.2.80.0040.00418.00
8.2.70.0090.00017.88
8.2.60.0040.00417.93
8.2.50.0080.00018.09
8.2.40.0040.00422.50
8.2.30.0000.00719.46
8.2.20.0030.00617.97
8.2.10.0000.00718.09
8.2.00.0000.00818.22
8.1.280.0120.00625.92
8.1.270.0130.00722.13
8.1.260.0070.00028.09
8.1.250.0000.00728.09
8.1.240.0040.00422.48
8.1.230.0070.00317.83
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0030.00617.47
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0040.00418.62
8.1.160.0070.00020.83
8.1.150.0040.00420.70
8.1.140.0030.00619.54
8.1.130.0070.00017.78
8.1.120.0030.00517.64
8.1.110.0000.00717.64
8.1.100.0040.00417.65
8.1.90.0000.00817.64
8.1.80.0030.00617.66
8.1.70.0070.00017.54
8.1.60.0000.00817.71
8.1.50.0000.00917.63
8.1.40.0060.00317.59
8.1.30.0040.00417.80
8.1.20.0040.00417.82
8.1.10.0060.00317.63
8.1.00.0080.00017.55
8.0.300.0060.00318.77
8.0.290.0000.00717.00
8.0.280.0070.00018.46
8.0.270.0080.00017.34
8.0.260.0030.00317.18
8.0.250.0000.00717.15
8.0.240.0040.00417.04
8.0.230.0050.00317.15
8.0.220.0040.00417.07
8.0.210.0000.00716.96
8.0.200.0000.00817.15
8.0.190.0060.00317.16
8.0.180.0070.00017.08
8.0.170.0040.00417.19
8.0.160.0000.00717.07
8.0.150.0040.00417.01
8.0.140.0070.00016.95
8.0.130.0030.00313.59
8.0.120.0030.00517.00
8.0.110.0050.00317.09
8.0.100.0000.00816.97
8.0.90.0040.00417.17
8.0.80.0100.00717.08
8.0.70.0040.00417.04
8.0.60.0000.00816.93
8.0.50.0040.00417.13
8.0.30.0120.00517.27
8.0.20.0130.00617.40
8.0.10.0000.00717.13
8.0.00.0090.00916.97
7.4.330.0020.00216.79
7.4.320.0070.00016.80
7.4.300.0000.00816.63
7.4.290.0040.00416.69
7.4.280.0040.00416.71
7.4.270.0070.00016.85
7.4.260.0070.00016.65
7.4.250.0040.00416.78
7.4.240.0020.00516.71
7.4.230.0040.00416.52
7.4.220.0120.00616.85
7.4.210.0060.01116.83
7.4.200.0070.00016.63
7.4.160.0060.01016.63
7.4.150.0120.00617.40
7.4.140.0130.00717.86
7.4.130.0100.00816.81
7.4.120.0090.00916.73
7.4.110.0130.00316.77
7.4.100.0130.01016.70
7.4.90.0060.01216.77
7.4.80.0150.00319.39
7.4.70.0050.01116.61
7.4.60.0100.00916.59
7.4.50.0080.00816.57
7.4.40.0120.00616.65
7.4.30.0090.01316.78
7.4.00.0070.00715.38
7.3.330.0030.00313.40
7.3.320.0090.00013.33
7.3.310.0000.00716.32
7.3.300.0070.00016.49
7.3.290.0040.00416.54
7.3.280.0060.00916.52
7.3.270.0070.01017.40
7.3.260.0070.01116.42
7.3.250.0100.01016.67
7.3.240.0100.00616.47
7.3.230.0120.00616.39
7.3.210.0100.00716.41
7.3.200.0060.01619.39
7.3.190.0060.01116.84
7.3.180.0060.00916.71
7.3.170.0080.00816.65
7.3.160.0140.00516.57
7.2.330.0120.01216.75
7.2.320.0190.00416.68
7.2.310.0070.01616.77
7.2.300.0070.01016.91
7.2.290.0030.01416.69
7.2.60.0000.01016.63
7.2.50.0070.00717.11
7.1.200.0140.00715.91
7.1.70.0070.01017.06
7.1.60.0100.01319.40
7.1.50.0170.00716.99
7.1.00.0000.08022.55
7.0.200.0030.00616.88
7.0.60.0270.04719.86
7.0.50.0070.03717.83
7.0.40.0030.05019.99
7.0.30.0300.04020.01
7.0.20.0370.06720.22
7.0.10.0130.08720.22
7.0.00.0070.04020.13
5.6.280.0030.06321.02
5.6.210.0170.07320.52
5.6.200.0130.07018.09
5.6.190.0030.04720.35
5.6.180.0130.07320.41
5.6.170.0200.04020.54
5.6.160.0170.05020.47
5.6.150.0000.05318.18
5.6.140.0070.03718.11
5.6.130.0030.04318.12
5.6.120.0030.08021.06
5.6.110.0170.07321.00
5.6.100.0030.07321.00
5.6.90.0000.06020.98
5.6.80.0000.08720.50
5.5.350.0230.08720.46
5.5.340.0130.07717.93
5.5.330.0030.04320.53
5.5.320.0500.05020.27
5.5.310.0270.07720.30
5.5.300.0070.07017.92
5.5.290.0130.03017.91
5.5.280.0230.07020.64
5.5.270.0070.07020.86
5.5.260.0070.08720.86
5.5.250.0100.07720.68
5.5.240.0170.04320.22

preferences:
48.88 ms | 401 KiB | 5 Q