3v4l.org

run code in 300+ PHP versions simultaneously
<?php //this code will append a &mobileapp to every https://example.com url and http://foobar.com url ob_start(); ?> <html> <head> </head> <body> <a href="http://foobar.com"> http://www.example.com/~hillybilly/foobar.php silly silly </body> </html> <?php $html = ob_get_clean(); $append = 'mobileapp'; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXpath($doc); $elements = $xpath->query('//*[@href | @src | @action]'); if (!is_null($elements)) { foreach ($elements as $element) { switch ($element->nodeName) { case 'a': $element->setAttribute('href', $element->getAttribute('href') . $append); } } } echo $doc->saveHtml();

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.0100.01018.68
8.3.50.0100.00521.34
8.3.40.0130.00319.22
8.3.30.0090.00620.59
8.3.20.0040.00420.54
8.3.10.0080.00022.29
8.3.00.0000.00822.77
8.2.180.0040.01516.63
8.2.170.0070.00722.96
8.2.160.0170.00022.60
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0080.00826.16
8.2.120.0000.00821.40
8.2.110.0030.00622.42
8.2.100.0040.00718.16
8.2.90.0000.00819.46
8.2.80.0040.00419.61
8.2.70.0040.00417.88
8.2.60.0050.00318.28
8.2.50.0030.00518.07
8.2.40.0000.00818.43
8.2.30.0030.00719.87
8.2.20.0030.00618.00
8.2.10.0060.00318.06
8.2.00.0030.00518.11
8.1.280.0140.00025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00024.30
8.1.230.0060.00619.60
8.1.220.0040.00418.03
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00917.91
8.1.180.0000.00818.10
8.1.170.0090.00018.94
8.1.160.0040.00420.90
8.1.150.0000.00718.92
8.1.140.0040.00417.78
8.1.130.0000.00818.05
8.1.120.0080.00017.76
8.1.110.0040.00417.82
8.1.100.0000.00817.77
8.1.90.0040.00417.74
8.1.80.0030.00517.73
8.1.70.0040.00417.76
8.1.60.0030.00617.95
8.1.50.0000.00717.80
8.1.40.0040.00417.88
8.1.30.0020.00517.83
8.1.20.0080.00017.86
8.1.10.0080.00017.85
8.1.00.0000.00817.88
8.0.300.0000.00918.77
8.0.290.0040.00417.68
8.0.280.0030.00318.78
8.0.270.0050.00317.53
8.0.260.0030.00317.14
8.0.250.0000.00617.31
8.0.240.0030.00617.34
8.0.230.0000.00717.24
8.0.220.0060.00317.16
8.0.210.0030.00317.12
8.0.200.0000.00717.25
8.0.190.0030.00517.27
8.0.180.0000.00817.19
8.0.170.0000.00817.11
8.0.160.0000.00817.34
8.0.150.0000.00717.15
8.0.140.0030.00417.12
8.0.130.0050.00313.60
8.0.120.0060.00317.27
8.0.110.0000.00817.17
8.0.100.0050.00217.35
8.0.90.0070.00017.03
8.0.80.0030.01217.21
8.0.70.0040.00417.10
8.0.60.0030.00517.11
8.0.50.0000.00717.18
8.0.30.0120.00617.45
8.0.20.0070.01217.50
8.0.10.0040.00417.25
8.0.00.0080.01416.96
7.4.330.0000.00515.00
7.4.320.0060.00016.93
7.4.300.0030.00316.83
7.4.290.0040.00416.79
7.4.280.0070.00016.82
7.4.270.0070.00016.80
7.4.260.0000.00513.68
7.4.250.0000.00816.80
7.4.240.0030.00516.79
7.4.230.0040.00417.06
7.4.220.0130.01316.98
7.4.210.0070.01016.89
7.4.200.0050.00216.87
7.4.190.0040.00417.08
7.4.160.0060.01016.63
7.4.150.0110.00617.40
7.4.140.0100.00917.86
7.4.130.0100.00816.94
7.4.120.0100.00716.82
7.4.110.0040.01416.88
7.4.100.0110.00716.77
7.4.90.0040.01516.88
7.4.80.0000.01919.39
7.4.70.0120.00616.87
7.4.60.0030.01316.70
7.4.50.0030.00617.02
7.4.40.0030.00922.77
7.4.30.0090.01216.82
7.4.00.0070.01015.09
7.3.330.0030.00313.52
7.3.320.0000.00513.41
7.3.310.0030.00316.47
7.3.300.0000.00816.46
7.3.290.0100.00716.51
7.3.280.0120.00516.54
7.3.270.0060.01017.40
7.3.260.0110.00616.96
7.3.250.0120.00816.62
7.3.240.0140.00316.75
7.3.230.0090.00916.80
7.3.210.0140.00416.73
7.3.200.0080.00819.39
7.3.190.0200.00316.68
7.3.180.0040.01217.03
7.3.170.0090.00616.58
7.3.160.0150.00016.71
7.3.120.0080.00415.06
7.3.10.0130.00816.59
7.3.00.0160.00316.22
7.2.330.0070.01117.09
7.2.320.0030.01416.91
7.2.310.0120.01217.00
7.2.300.0060.01317.23
7.2.290.0060.01816.93
7.2.130.0130.00416.48
7.2.120.0100.00716.31
7.2.110.0050.01416.96
7.2.100.0120.00016.60
7.2.90.0060.01316.85
7.2.80.0130.00316.86
7.2.70.0170.01217.09
7.2.60.0040.01116.92
7.2.50.0230.01117.01
7.2.40.0140.00816.87
7.2.30.0160.00317.05
7.2.20.0060.00617.06
7.2.10.0130.00917.07
7.2.00.0080.00817.00
7.1.250.0000.00915.61
7.1.200.0080.00615.58
7.1.100.0070.00718.24
7.1.70.0000.00917.14
7.1.60.0060.01919.32
7.1.50.0170.02035.00
7.1.00.0030.03322.54
7.0.200.0030.00517.10
7.0.140.0030.07022.22
7.0.100.0200.07020.11
7.0.90.0200.08020.21
7.0.80.0130.08020.30
7.0.70.0070.08020.19
7.0.60.0130.08320.13
7.0.50.0300.04320.45
7.0.40.0170.08020.16
7.0.30.0030.09320.27
7.0.20.0100.07020.26
7.0.10.0130.07720.24
7.0.00.0200.07020.25
5.6.280.0100.06721.29
5.6.250.0030.08720.75
5.6.240.0200.04020.91
5.6.230.0100.08020.80
5.6.220.0100.07320.79
5.6.210.0170.07720.80
5.6.200.0100.07321.21
5.6.190.0030.08721.25
5.6.180.0130.07321.25
5.6.170.0100.08721.16
5.6.160.0070.06721.23
5.6.150.0070.08321.16
5.6.140.0100.07721.13
5.6.130.0100.07721.12
5.6.120.0030.05721.23
5.6.110.0030.08321.20
5.6.100.0100.08021.06
5.6.90.0100.08321.27
5.6.80.0170.03720.61
5.6.70.0100.07020.51
5.6.60.0130.07720.58
5.6.50.0200.06320.64
5.6.40.0030.08020.59
5.6.30.0100.04320.49
5.6.20.0000.08020.57
5.6.10.0070.07720.63
5.6.00.0100.06720.47
5.5.380.0130.07720.51
5.5.370.0070.07720.53
5.5.360.0100.08020.60
5.5.350.0170.08320.55
5.5.340.0030.09021.07
5.5.330.0070.08021.02
5.5.320.0000.08021.00
5.5.310.0070.07321.06
5.5.300.0130.08021.02
5.5.290.0070.08321.05
5.5.280.0100.08020.95
5.5.270.0100.07020.95
5.5.260.0070.08021.05
5.5.250.0170.07020.82
5.5.240.0130.07720.30
5.5.230.0000.08720.40
5.5.220.0070.08020.34
5.5.210.0030.07720.37
5.5.200.0100.08020.27
5.5.190.0100.07720.35
5.5.180.0100.03720.39
5.5.160.0070.07720.30
5.5.150.0030.08020.30
5.5.140.0100.06320.41
5.5.130.0200.07020.36
5.5.120.0030.09020.27
5.5.110.0000.05320.25
5.5.100.0070.07720.23
5.5.90.0100.07320.22
5.5.80.0100.06720.23
5.5.70.0070.04720.15
5.5.60.0030.08320.19
5.5.50.0070.04720.21
5.5.40.0030.06720.28
5.5.30.0070.07720.17
5.5.20.0070.07720.27
5.5.10.0000.05320.16
5.5.00.0130.07020.15
5.4.450.0070.08019.59
5.4.440.0100.07019.52
5.4.430.0130.07319.53
5.4.420.0030.08719.56
5.4.410.0130.07319.37
5.4.400.0200.05719.24
5.4.390.0030.07719.21
5.4.380.0030.08319.19
5.4.370.0100.06719.19
5.4.360.0130.07019.21
5.4.350.0000.08719.02
5.4.340.0070.07319.18
5.4.320.0130.07319.28
5.4.310.0030.07019.25
5.4.300.0030.08019.04
5.4.290.0030.08019.09
5.4.280.0130.06719.19
5.4.270.0170.06719.21
5.4.260.0130.06719.30
5.4.250.0070.04719.18
5.4.240.0070.07019.21
5.4.230.0070.06319.01
5.4.220.0170.06319.24
5.4.210.0130.07019.23
5.4.200.0230.05019.23
5.4.190.0130.07019.09
5.4.180.0070.08018.98
5.4.170.0070.06319.01
5.4.160.0070.07019.18
5.4.150.0030.07719.29
5.4.140.0030.07316.56
5.4.130.0000.07716.59
5.4.120.0030.04016.52
5.4.110.0070.07716.47
5.4.100.0030.07316.43
5.4.90.0070.04016.51
5.4.80.0100.07016.46
5.4.70.0130.07016.68
5.4.60.0100.06716.54
5.4.50.0130.03716.46
5.4.40.0170.06316.48
5.4.30.0100.05716.41
5.4.20.0070.07716.49
5.4.10.0070.07016.46
5.4.00.0000.07715.66
5.3.290.0100.07014.74
5.3.280.0070.07714.66
5.3.270.0100.07314.75
5.3.260.0000.08714.75
5.3.250.0130.07014.75
5.3.240.0030.08014.67
5.3.230.0070.07714.61
5.3.220.0200.06314.73
5.3.210.0070.06314.71
5.3.200.0030.07314.68
5.3.190.0030.07014.71
5.3.180.0030.07314.68
5.3.170.0070.05714.60
5.3.160.0100.07314.71
5.3.150.0200.06014.73
5.3.140.0070.05714.68
5.3.130.0100.07314.61
5.3.120.0130.06714.69
5.3.110.0030.07714.61
5.3.100.0070.06714.05
5.3.90.0170.03314.08
5.3.80.0130.06014.16
5.3.70.0100.07714.09
5.3.60.0100.07014.00
5.3.50.0030.07714.09
5.3.40.0030.07314.00
5.3.30.0070.07014.02
5.3.20.0070.06713.69
5.3.10.0170.06313.84
5.3.00.0070.05313.67
5.2.170.0000.04011.36
5.2.160.0030.06011.29
5.2.150.0030.06711.21
5.2.140.0030.03711.29
5.2.130.0000.06311.23
5.2.120.0000.04011.16
5.2.110.0070.05711.18
5.2.100.0070.06311.11
5.2.90.0070.06011.27
5.2.80.0030.05011.30
5.2.70.0030.06711.26
5.2.60.0100.05711.26
5.2.50.0070.06311.19
5.2.40.0070.05311.06
5.2.30.0070.05711.14
5.2.20.0000.06711.21
5.2.10.0070.06311.09
5.2.00.0100.05710.90
5.1.60.0070.05310.21
5.1.50.0000.05710.21
5.1.40.0100.05010.15
5.1.30.0100.04010.56
5.1.20.0030.05710.43
5.1.10.0170.04710.24
5.1.00.0030.05310.30
5.0.50.0030.0508.86
5.0.40.0030.0438.86
5.0.30.0070.0578.86
5.0.20.0030.0378.86
5.0.10.0000.0478.86
5.0.00.0070.0608.86
4.4.90.0070.0308.86
4.4.80.0030.0338.86
4.4.70.0030.0338.86
4.4.60.0070.0308.86
4.4.50.0000.0408.86
4.4.40.0030.0408.86
4.4.30.0070.0308.86
4.4.20.0030.0208.86
4.4.10.0030.0378.86
4.4.00.0030.0578.86
4.3.110.0070.0278.86
4.3.100.0030.0338.86
4.3.90.0030.0308.86
4.3.80.0000.0308.86
4.3.70.0000.0378.86
4.3.60.0000.0338.86
4.3.50.0070.0308.86
4.3.40.0000.0438.86
4.3.30.0000.0378.86
4.3.20.0000.0338.86
4.3.10.0000.0378.86
4.3.00.0030.0338.86

preferences:
42.12 ms | 401 KiB | 5 Q