3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <p>Some random text <iframe src="http://some-random-link.com" width="425" height="350" frameborder="0"></iframe> <iframe src="https://cant-touch-this.com" width="425" height="350" frameborder="0"></iframe> </p> HTML; $dom = new DOMDocument; $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($dom); foreach ($xpath->query("//iframe[starts-with(@src, 'http') and not(starts-with(@src, 'https'))]/@src") as $src) { $src->nodeValue = substr_replace($src->nodeValue, 's', 4, 0); } echo $dom->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.4.140.0110.01018.13
8.4.130.0100.01018.06
8.4.120.0100.01020.98
8.4.110.0130.00719.14
8.4.100.0120.00218.26
8.4.90.0120.00719.11
8.4.80.0060.00317.94
8.4.70.0100.01018.10
8.4.60.0100.01120.59
8.4.50.0130.00919.82
8.4.40.0170.00319.73
8.4.30.0110.00722.89
8.4.20.0140.00718.28
8.4.10.0040.00420.45
8.3.270.0140.00617.17
8.3.260.0110.00917.02
8.3.250.0040.00519.24
8.3.240.0110.00416.99
8.3.230.0140.00616.70
8.3.220.0090.01117.67
8.3.210.0090.00917.05
8.3.200.0060.00817.13
8.3.190.0090.00619.29
8.3.180.0060.00417.04
8.3.170.0100.01017.34
8.3.160.0130.00618.59
8.3.150.0130.00619.37
8.3.140.0040.00417.15
8.3.130.0040.00418.64
8.3.120.0060.00321.10
8.3.110.0030.00520.94
8.3.100.0060.01316.86
8.3.90.0040.01126.77
8.3.80.0030.00616.88
8.3.70.0060.00917.25
8.3.60.0120.00618.68
8.3.50.0140.00523.80
8.3.40.0120.00319.26
8.3.30.0190.00019.22
8.3.20.0040.00421.26
8.3.10.0040.00420.61
8.3.00.0000.00819.02
8.2.290.0090.00720.75
8.2.280.0080.00218.76
8.2.270.0150.00417.75
8.2.260.0120.00619.20
8.2.250.0060.00318.99
8.2.240.0040.01119.19
8.2.230.0080.00022.58
8.2.220.0130.00324.06
8.2.210.0060.00326.77
8.2.200.0000.00916.73
8.2.190.0120.00316.86
8.2.180.0060.00918.78
8.2.170.0120.00622.96
8.2.160.0140.00020.48
8.2.150.0070.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0000.00819.86
8.2.110.0070.00319.52
8.2.100.0080.00417.97
8.2.90.0090.00018.09
8.2.80.0040.00819.55
8.2.70.0000.00818.18
8.2.60.0040.00418.28
8.2.50.0050.00318.10
8.2.40.0040.00419.72
8.2.30.0050.00219.48
8.2.20.0020.00518.51
8.2.10.0000.00719.66
8.2.00.0020.00519.78
8.1.330.0110.00822.08
8.1.320.0080.01116.79
8.1.310.0030.00517.10
8.1.300.0090.00020.14
8.1.290.0030.00630.84
8.1.280.0110.00425.92
8.1.270.0070.00424.11
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0120.00922.30
8.1.230.0040.00721.29
8.1.220.0050.00318.04
8.1.210.0040.00419.28
8.1.200.0060.00317.61
8.1.190.0000.00817.60
8.1.180.0090.00019.22
8.1.170.0050.00518.54
8.1.160.0040.00419.35
8.1.150.0000.00719.28
8.1.140.0050.00319.16
8.1.130.0040.00420.50
8.1.120.0030.00517.87
8.1.110.0060.00617.80
8.1.100.0030.00517.82
8.1.90.0030.00517.76
8.1.80.0030.00617.83
8.1.70.0030.00317.74
8.1.60.0030.00617.86
8.1.50.0030.00517.76
8.1.40.0050.00317.89
8.1.30.0040.00418.00
8.1.20.0080.00017.89
8.1.10.0030.00517.84
8.1.00.0000.00817.88
8.0.300.0050.00320.47
8.0.290.0080.00017.00
8.0.280.0030.00318.76
8.0.270.0000.00717.20
8.0.260.0040.00420.29
8.0.250.0000.00717.27
8.0.240.0000.00617.31
8.0.230.0000.00717.39
8.0.220.0050.00317.31
8.0.210.0040.00417.28
8.0.200.0000.00717.27
8.0.190.0040.00417.24
8.0.180.0040.00417.37
8.0.170.0030.00517.32
8.0.160.0000.00717.32
8.0.150.0050.00217.25
8.0.140.0040.00417.25
8.0.130.0000.00613.77
8.0.120.0000.00817.15
8.0.110.0000.00717.32
8.0.100.0040.00417.07
8.0.90.0000.00917.16
8.0.80.0040.01217.37
8.0.70.0050.00317.16
8.0.60.0060.00317.21
8.0.50.0000.00917.24
8.0.30.0090.00917.76
8.0.20.0100.00817.27
8.0.10.0020.00517.38
8.0.00.0090.00917.13
7.4.330.0000.00717.04
7.4.320.0030.00516.96
7.4.300.0030.00316.93
7.4.290.0070.00016.84
7.4.280.0000.00816.90
7.4.270.0000.00716.84
7.4.260.0000.00513.54
7.4.250.0030.00316.91
7.4.240.0050.00316.94
7.4.230.0080.00016.73
7.4.220.0030.00316.91
7.4.210.0080.00616.92
7.4.200.0070.00017.07
7.4.130.0080.01116.82
7.4.120.0060.01716.78
7.4.110.0060.01216.80
7.4.100.0160.01016.75
7.4.90.0060.01216.68
7.4.80.0160.00819.39
7.4.70.0060.01116.76
7.4.60.0030.01416.68
7.4.50.0070.01016.61
7.4.40.0080.00817.05
7.4.20.0070.01416.85
7.4.10.0090.01216.70
7.4.00.0180.00316.78
7.3.330.0040.00416.54
7.3.320.0000.00513.35
7.3.310.0030.00516.67
7.3.300.0040.00416.63
7.3.290.0080.00616.61
7.3.280.0100.00716.62
7.3.260.0120.00616.82
7.3.240.0070.01016.66
7.3.230.0060.01616.73
7.3.210.0090.01216.68
7.3.200.0140.00616.84
7.3.190.0030.01316.64
7.3.180.0080.00816.90
7.3.170.0030.01316.65
7.3.160.0070.01016.98
7.3.140.0030.01816.75
7.3.130.0120.00916.65
7.3.120.0100.00616.82
7.3.110.0090.00916.53
7.3.100.0070.01016.76
7.3.90.0030.01316.78
7.3.80.0140.00716.45
7.3.70.0080.00816.66
7.3.60.0070.01016.61
7.3.50.0150.00616.73
7.3.40.0090.01216.76
7.3.30.0110.00616.66
7.3.20.0160.00716.59
7.3.10.0100.01016.53
7.3.00.0190.00316.76
7.2.330.0050.01417.11
7.2.320.0030.01317.18
7.2.310.0080.00816.78
7.2.300.0090.00917.11
7.2.290.0100.01317.14
7.2.270.0060.01216.90
7.2.260.0110.00617.10
7.2.250.0030.01317.06
7.2.240.0110.01116.94
7.2.230.0060.01616.72
7.2.220.0120.01217.05
7.2.210.0160.00616.70
7.2.200.0130.00917.03
7.2.190.0120.00916.89
7.2.180.0080.00816.98
7.2.170.0100.00717.03
7.2.160.0180.00316.85
7.2.150.0100.01117.01
7.2.140.0090.00916.86
7.2.130.0100.00717.11
7.2.120.0060.01716.93
7.2.110.0130.00917.13
7.2.100.0120.00617.12
7.2.90.0260.00316.95
7.2.80.0120.00616.91
7.2.70.0060.01817.14
7.2.60.0110.00717.00
7.2.50.0000.01717.05
7.2.40.0130.01017.04
7.2.30.0070.01117.11
7.2.20.0080.01216.95
7.2.10.0120.00916.95
7.2.00.0080.01116.96

preferences:
31.03 ms | 403 KiB | 5 Q