3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET['page'] = '\',\'asd\')&& phpinfo() && strpos(\'asd\', \''; if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = "home"; } $file = "templates/" . $page . ".php"; echo "strpos('$file', '..') === false"; // I heard '..' is dangerous! assert("strpos('$file', '..') === false") or die("Detected hacking attempt!"); // TODO: Make this look nice assert("file_exists('$file')") or die("That file doesn't exist!");

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.80.0100.00016.50
8.3.70.0150.00316.75
8.3.60.0130.00616.75
8.3.50.0190.01021.20
8.3.40.0090.00618.76
8.3.30.0030.01218.78
8.3.20.0070.00020.34
8.3.10.0070.00023.54
8.3.00.0040.00422.40
8.2.200.0060.00318.17
8.2.190.0150.00316.58
8.2.180.0030.01225.92
8.2.170.0040.01118.64
8.2.160.0150.00022.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0050.00322.26
8.2.120.0060.00326.16
8.2.110.0000.00820.75
8.2.100.0030.00918.18
8.2.90.0030.00619.38
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0040.00418.16
8.2.50.0030.00618.10
8.2.40.0050.00320.30
8.2.30.0040.00419.24
8.2.20.0000.00817.89
8.2.10.0060.00318.18
8.2.00.0050.00217.79
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0080.00024.66
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.92
8.1.230.0000.01118.98
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0000.00817.47
8.1.190.0030.00617.00
8.1.180.0050.00318.10
8.1.170.0090.00018.46
8.1.160.0030.00322.26
8.1.150.0070.00018.82
8.1.140.0040.00422.07
8.1.130.0060.00317.39
8.1.120.0030.00417.44
8.1.110.0000.00717.46
8.1.100.0000.00717.33
8.1.90.0000.00817.48
8.1.80.0040.00417.37
8.1.70.0070.00017.43
8.1.60.0020.00517.53
8.1.50.0030.00617.54
8.1.40.0000.00917.53
8.1.30.0060.00617.63
8.1.20.0040.00417.66
8.1.10.0070.00017.56
8.1.00.0040.00417.45
8.0.300.0020.00518.77
8.0.290.0080.00016.88
8.0.280.0000.00718.46
8.0.270.0030.00316.78
8.0.260.0080.00016.82
8.0.250.0000.00717.07
8.0.240.0000.00716.97
8.0.230.0030.00617.00
8.0.220.0000.00816.86
8.0.210.0070.00016.86
8.0.200.0000.00617.00
8.0.190.0000.00817.02
8.0.180.0040.00416.98
8.0.170.0020.00516.98
8.0.160.0040.00416.97
8.0.150.0030.00316.91
8.0.140.0040.00416.86
8.0.130.0000.00713.28
8.0.120.0040.00416.94
8.0.110.0030.00616.80
8.0.100.0040.00417.03
8.0.90.0040.00417.09
8.0.80.0090.00617.00
8.0.70.0040.00417.02
8.0.60.0070.00016.82
8.0.50.0000.00717.04
8.0.30.0100.00817.20
8.0.20.0120.01817.40
8.0.10.0030.00317.05
8.0.00.0130.00316.72
7.4.330.0050.00016.66
7.4.320.0000.00616.65
7.4.300.0030.00316.63
7.4.290.0030.00316.64
7.4.280.0000.00716.54
7.4.270.0000.00716.57
7.4.260.0000.00716.66
7.4.250.0000.00716.52
7.4.240.0030.00616.64
7.4.230.0070.00016.61
7.4.220.0140.00716.66
7.4.210.0040.01016.55
7.4.200.0040.00416.74
7.4.160.0120.00616.46
7.4.150.0130.01317.40
7.4.140.0090.01517.86
7.4.130.0110.00616.73
7.4.120.0090.01116.73
7.4.110.0120.00616.54
7.4.100.0110.01216.55
7.4.90.0030.01316.41
7.4.80.0130.00319.39
7.4.70.0070.01016.61
7.4.60.0090.00916.65
7.4.50.0060.00916.68
7.4.40.0170.00316.64
7.4.30.0130.00316.56
7.4.10.0040.01114.82
7.4.00.0090.00915.14
7.3.330.0000.00513.19
7.3.320.0050.00013.28
7.3.310.0000.00716.30
7.3.300.0030.00316.47
7.3.290.0020.00516.32
7.3.280.0080.00816.39
7.3.270.0160.00317.40
7.3.260.0090.00816.52
7.3.250.0120.00716.57
7.3.240.0110.00516.59
7.3.230.0070.01116.55
7.3.210.0060.01316.39
7.3.200.0100.01316.44
7.3.190.0130.00316.60
7.3.180.0170.00316.41
7.3.170.0100.00616.54
7.3.160.0060.01216.68
7.3.130.0130.00714.89
7.3.120.0030.01614.70
7.3.110.0070.01015.16
7.3.100.0040.01114.94
7.3.90.0040.01115.21
7.3.80.0160.00314.69
7.3.70.0110.00414.82
7.3.60.0070.00314.92
7.3.50.0060.00315.07
7.3.40.0110.00714.99
7.3.30.0030.00614.86
7.3.20.0110.00416.63
7.3.10.0090.00916.80
7.3.00.0030.01416.88
7.2.330.0170.01016.43
7.2.320.0130.00316.78
7.2.310.0060.01316.70
7.2.300.0060.01216.75
7.2.290.0000.01716.43
7.2.260.0090.00914.87
7.2.250.0130.00615.26
7.2.240.0000.01515.25
7.2.230.0130.00314.91
7.2.220.0000.01415.34
7.2.210.0100.00715.10
7.2.200.0060.00615.18
7.2.190.0070.00715.21
7.2.180.0070.00714.81
7.2.170.0090.00615.05
7.2.160.0060.00915.14
7.2.150.0100.01016.91
7.2.140.0080.00717.09
7.2.130.0050.00517.08
7.2.120.0060.00916.94
7.2.110.0190.00516.89
7.2.100.0000.01316.95
7.2.90.0000.01417.13
7.2.80.0060.00816.96
7.2.70.0090.00616.94
7.2.60.0050.00617.11
7.2.50.0000.00916.79
7.2.40.0000.01517.04
7.2.30.0000.01716.96
7.2.20.0090.00317.14
7.2.10.0090.00316.62
7.2.00.0030.01317.11
7.1.330.0060.00615.91
7.1.320.0060.00616.03
7.1.310.0040.01115.75
7.1.300.0130.00315.67
7.1.290.0060.01215.63
7.1.280.0060.00615.87
7.1.270.0000.01215.80
7.1.260.0060.01215.88
7.1.250.0040.01115.84
7.1.240.0070.01015.69
7.1.230.0000.01515.70
7.1.220.0070.01015.70
7.1.210.0080.00315.95
7.1.200.0060.00515.80
7.1.190.0090.00915.72
7.1.180.0090.00915.82
7.1.170.0000.01315.98
7.1.160.0000.01115.59
7.1.150.0030.01215.61
7.1.140.0060.00615.98
7.1.130.0070.00715.88
7.1.120.0170.00816.44
7.1.110.0110.00916.09
7.1.100.0110.01116.16
7.1.90.0200.00816.07
7.1.80.0190.00715.90
7.1.70.0090.01116.14
7.1.60.0130.01022.04
7.1.50.0130.01422.01
7.1.40.0170.01324.28
7.1.30.0250.00524.42
7.1.20.0160.01224.14
7.1.10.0140.00715.15
7.1.00.0090.03217.76
7.0.330.0000.01415.38
7.0.320.0060.00615.21
7.0.310.0060.00615.39
7.0.300.0040.00815.49
7.0.290.0090.00015.50
7.0.280.0130.00315.48
7.0.270.0030.00915.58
7.0.260.0060.00315.54
7.0.250.0160.00415.61
7.0.240.0170.00715.69
7.0.230.0160.00915.60
7.0.220.0160.00315.84
7.0.210.0170.00315.14
7.0.200.0110.00915.65
7.0.190.0350.01015.26
7.0.180.0150.01115.03
7.0.170.0170.00514.77
7.0.160.0190.00215.04
7.0.150.0140.00715.10
7.0.140.0100.00514.98
7.0.130.0140.00714.95
7.0.120.0130.00915.05
7.0.110.0240.02616.67
7.0.100.0210.02516.68
7.0.90.0220.02916.57
7.0.80.0230.02416.58
7.0.70.0190.02516.68
7.0.60.0210.02516.48
7.0.50.0230.02416.83
7.0.40.0200.02716.20
7.0.30.0230.02416.28
7.0.20.0280.01916.09
7.0.10.0130.03416.10
7.0.00.0240.02616.14
5.6.400.0090.00614.41
5.6.390.0030.01214.63
5.6.380.0030.00613.97
5.6.370.0090.00614.73
5.6.360.0060.00914.36
5.6.350.0000.01514.35
5.6.340.0130.00314.23
5.6.330.0070.00714.71
5.6.320.0040.00714.29
5.6.310.0030.01014.80
5.6.300.0030.03817.60
5.6.290.0080.03617.67
5.6.280.0050.03317.71
5.6.270.0100.03117.63
5.6.260.0110.03918.62
5.6.250.0120.03818.64
5.6.240.0080.04918.62
5.6.230.0080.04518.70
5.6.220.0090.03818.61
5.6.210.0090.04118.77
5.6.200.0090.04018.76
5.6.190.0140.03418.92
5.6.180.0110.04318.82
5.6.170.0100.04218.72
5.6.160.0110.04018.61
5.6.150.0130.04018.90
5.6.140.0120.04618.87
5.6.130.0110.04118.79
5.6.120.0160.03618.87
5.6.110.0090.05318.81
5.6.100.0120.04418.82
5.6.90.0120.04118.81
5.6.80.0060.04118.51
5.6.70.0120.03618.37
5.6.60.0150.03318.24
5.6.50.0090.04518.26
5.6.40.0130.04518.32
5.6.30.0110.03718.36
5.6.20.0130.04518.22
5.6.10.0120.03918.34
5.6.00.0080.03618.29

preferences:
64.4 ms | 401 KiB | 5 Q