3v4l.org

run code in 500+ PHP versions simultaneously
<?php $html = <<<HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content=""> <meta name="description" content=""> <meta name="author" content=""> <title></title> <link rel="apple-touch-icon" href=""> <link rel="shortcut icon" href=""> <!-- Stylesheets --> <link rel="stylesheet" href=""> <!-- Some Stylesheets --> <link rel="stylesheet" href=""> <!-- Some Stylesheets --> <link rel="stylesheet" href=""> <!-- Some Stylesheets --> <!-- Scripts --> <script src=""></script> </head> <body class=""> <nav class="nav1" role="navigation"> <!-- Some HTML --> </nav> <div class="menubar1"> <!-- Some HTML --> </div> <div class="menubar2"> <div> <div> <ul> <li></li> </ul> </div> </div> <!-- Some HTML --> </div> <!-- ========================================================= --> <!-- ========================================================= --> <!-- PAGE CONTENTS --> <!-- ========================================================= --> <!-- ========================================================= --> <!-- Footer --> <footer class="site-footer"> <!-- Some HTML --> </footer> <script src=""></script> <!-- Some Script Tags --> <script src=""></script> <!-- Some Script Tags --> <script src=""></script> <!-- Some Script Tags --> <script src=""></script> <!-- Some Script Tags --> <!-- Page --> <!-- Google Analytics --> <script> /* Some Scripts */ </script> </body> </html> HTML; libxml_use_internal_errors(true); $doc = new \DOMDocument(); $doc->loadHTML($html); $menubar2_inner_div_count = (new \DOMXPath($doc))->query('//div[@class="menubar2"]//div')->length; $html = preg_replace('/^.*?<div class="menubar2">' . str_repeat('.*?<\/div>', $menubar2_inner_div_count + 1) . '/s', '<!-- Header -->' . PHP_EOL . '<?php include_once "include/header.php" ?>', $html); $html = preg_replace('/<footer class="site-footer">.*?<\/html>/s', '<?php include_once "include/footer.php" ?>', $html); $html = preg_replace('/^ {8}/m', '', $html); echo $html;

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.5.30.0120.00721.64
8.5.20.0090.00919.93
8.5.10.0060.01417.09
8.5.00.0130.00920.56
8.4.180.0130.01020.10
8.4.170.0150.00921.03
8.4.160.0160.00624.25
8.4.150.0080.00517.21
8.4.140.0110.01018.37
8.4.130.0090.01119.15
8.4.120.0110.01024.47
8.4.110.0050.00521.02
8.4.100.0120.01018.39
8.4.90.0140.00818.64
8.4.80.0140.00721.14
8.4.70.0140.00718.27
8.4.60.0130.00818.45
8.4.50.0110.01018.81
8.4.40.0070.01418.45
8.4.30.0160.00320.62
8.4.20.0070.01320.75
8.4.10.0060.00319.96
8.3.300.0100.01221.21
8.3.290.0070.00321.04
8.3.280.0060.00618.82
8.3.270.0100.00917.17
8.3.260.0120.00917.15
8.3.250.0120.00719.18
8.3.240.0120.00717.58
8.3.230.0070.00317.16
8.3.220.0120.00817.60
8.3.210.0070.01317.47
8.3.200.0120.00917.18
8.3.190.0130.00617.45
8.3.180.0040.00517.76
8.3.170.0160.00319.14
8.3.160.0080.00020.67
8.3.150.0060.01317.74
8.3.140.0070.01117.34
8.3.130.0100.00619.04
8.3.120.0060.00321.29
8.3.110.0040.00420.94
8.3.100.0030.00617.16
8.3.90.0040.00426.77
8.3.80.0090.00018.93
8.3.70.0120.00317.00
8.3.60.0140.00718.93
8.3.50.0100.00817.77
8.3.40.0110.01119.23
8.3.30.0060.00919.37
8.3.20.0000.00921.20
8.3.10.0050.00320.75
8.3.00.0040.00423.89
8.2.300.0110.01022.68
8.2.290.0050.00319.27
8.2.280.0040.00417.22
8.2.270.0100.01017.76
8.2.260.0060.01317.20
8.2.250.0060.00317.35
8.2.240.0130.00319.38
8.2.230.0060.00322.58
8.2.220.0060.00924.06
8.2.210.0050.00326.77
8.2.200.0090.00018.79
8.2.190.0110.01118.91
8.2.180.0140.00725.92
8.2.170.0070.00719.41
8.2.160.0080.00622.96
8.2.150.0030.00624.18
8.2.140.0030.00624.66
8.2.130.0060.00326.16
8.2.120.0050.00326.16
8.2.110.0110.00021.44
8.2.100.0080.00418.34
8.2.90.0030.00521.12
8.2.80.0070.00320.75
8.2.70.0040.00418.13
8.2.60.0030.00618.13
8.2.50.0000.00818.25
8.2.40.0080.00018.25
8.2.30.0030.00719.63
8.2.20.0040.00418.35
8.2.10.0000.00819.49
8.2.00.0040.00419.78
8.1.340.0090.01118.22
8.1.330.0110.01022.35
8.1.320.0090.00716.94
8.1.310.0120.00618.86
8.1.300.0030.01820.71
8.1.290.0060.00330.84
8.1.280.0130.00725.92
8.1.270.0030.00622.72
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0090.00922.56
8.1.230.0060.00623.19
8.1.220.0000.00818.16
8.1.210.0030.00519.35
8.1.200.0000.00817.86
8.1.190.0030.00517.85
8.1.180.0000.00818.10
8.1.170.0040.00417.89
8.1.160.0040.00419.23
8.1.150.0080.00019.27
8.1.140.0030.00519.26
8.1.130.0050.00218.07
8.1.120.0030.00718.01
8.1.110.0000.00917.84
8.1.100.0030.00617.93
8.1.90.0030.00517.85
8.1.80.0040.00418.07
8.1.70.0000.00718.01
8.1.60.0000.00917.97
8.1.50.0000.00817.92
8.1.40.0000.00818.06
8.1.30.0050.00518.13
8.1.20.0000.01018.06
8.1.10.0000.00817.97
8.1.00.0000.00818.06
8.0.300.0080.00020.60
8.0.290.0060.00317.38
8.0.280.0040.00418.80
8.0.270.0040.00417.54
8.0.260.0000.00718.80
8.0.250.0040.00417.51
8.0.240.0000.00717.57
8.0.230.0070.00017.49
8.0.220.0060.00317.52
8.0.210.0040.00417.35
8.0.200.0050.00317.51
8.0.190.0050.00317.58
8.0.180.0040.00417.31
8.0.170.0050.00517.49
8.0.160.0000.00817.39
8.0.150.0000.00717.35
8.0.140.0040.00417.25
8.0.130.0060.00013.99
8.0.120.0000.00917.51
8.0.110.0050.00317.43
8.0.100.0000.00717.39
8.0.90.0040.00417.53
8.0.80.0110.00917.49
8.0.70.0000.00717.56
8.0.60.0040.00417.48
8.0.50.0080.00017.25
8.0.30.0190.00617.43
8.0.20.0160.01217.59
8.0.10.0040.00417.50
8.0.00.0110.00917.31
7.4.330.0000.00515.55
7.4.320.0000.00717.20
7.4.300.0030.00317.16
7.4.290.0000.00917.22
7.4.280.0000.00817.23
7.4.270.0040.00417.17
7.4.260.0000.00817.12
7.4.250.0030.00717.11
7.4.240.0030.00417.10
7.4.230.0070.00017.11
7.4.220.0050.00317.20
7.4.210.0060.00917.18
7.4.200.0040.00416.90
7.4.140.0090.01217.86
7.4.130.0120.00617.12
7.4.120.0070.01017.09
7.4.110.0080.01017.10
7.4.100.0090.00916.87
7.4.90.0060.01217.33
7.4.80.0100.01419.39
7.4.70.0070.01117.03
7.4.60.0030.01417.21
7.4.50.0000.01317.00
7.4.40.0130.00316.99
7.4.00.0090.00915.22
7.3.330.0060.00013.48
7.3.320.0060.00013.86
7.3.310.0050.00216.63
7.3.300.0030.00316.81
7.3.290.0100.00616.87
7.3.280.0070.00916.81
7.3.260.0120.01116.98
7.3.240.0120.00816.98
7.3.230.0120.02116.84
7.3.210.0060.01416.90
7.3.200.0070.01017.07
7.3.190.0000.02516.91
7.3.180.0110.00617.06
7.3.170.0090.01316.82
7.3.160.0040.01217.01
7.3.120.0090.00915.23
7.3.110.0080.00815.20
7.3.100.0030.00914.91
7.3.90.0090.00615.07
7.3.80.0000.01615.27
7.3.70.0080.00014.88
7.3.60.0100.00315.12
7.3.50.0070.00915.19
7.3.40.0100.00814.98
7.3.30.0040.01415.17
7.3.20.0060.00915.94
7.3.10.0090.00916.04
7.3.00.0080.00816.11
7.2.330.0160.00317.12
7.2.320.0060.01217.32
7.2.310.0100.00617.14
7.2.300.0100.00717.17
7.2.290.0100.00717.30
7.2.250.0060.00615.42
7.2.240.0100.01015.70
7.2.230.0000.01115.28
7.2.220.0100.00715.23
7.2.210.0030.00915.22
7.2.200.0030.00615.51
7.2.190.0090.00915.35
7.2.180.0050.00815.37
7.2.170.0070.00815.28
7.2.160.0060.01115.38
7.2.150.0830.01016.28
7.2.140.0050.01216.39
7.2.130.0100.00516.49
7.2.120.0050.00816.34
7.2.110.0140.00516.29
7.2.100.0060.00716.41
7.2.90.0050.00616.31
7.2.80.0050.01416.24
7.2.70.0110.00816.34
7.2.60.0100.00516.37
7.2.50.0090.01116.54
7.2.40.0110.00516.28
7.2.30.0090.00616.53
7.2.20.0100.00516.42
7.2.10.0040.01016.44
7.2.00.0110.00916.51
7.1.330.0080.00415.95
7.1.320.0080.00016.05
7.1.310.0030.01416.12
7.1.300.0060.00915.92
7.1.290.0030.01316.14
7.1.280.0110.00914.91
7.1.270.0070.00615.26
7.1.260.0070.00714.97
7.1.250.0120.00315.27

preferences:
47.76 ms | 1577 KiB | 5 Q