3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div> Here is an img tag with no qs <img src="http://www.example.com/a.jpg">, an img with no src <img title="to be determined">, and here is another with a qs <img src="http://www.example.com/b.jpg?height=900">. Here is a <iframe src="http://www.example.com/c.jpg?foo=bar"></iframe> and a submit button <input type="image" src="http://www.example.com/d.jpg?boo=far&what=now" alt="Submit"> </div> HTML; $newUrl = 'https://www.example.com/new.jpg'; $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($dom); foreach ($xpath->query("//img/@src") as $src) { $src->value = $newUrl; } 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.5.10.0100.00916.92
8.5.00.0130.01120.16
8.4.150.0010.00114.05
8.4.140.0140.01117.84
8.4.130.0120.00818.43
8.4.120.0150.00722.62
8.4.110.0180.00322.96
8.4.100.0060.01118.04
8.4.90.0120.00820.85
8.4.80.0050.00319.51
8.4.70.0060.00318.24
8.4.60.0140.00720.74
8.4.50.0140.00719.25
8.4.40.0150.00717.95
8.4.30.0100.01018.78
8.4.20.0060.00620.13
8.4.10.0060.00320.02
8.3.280.0100.01118.69
8.3.270.0130.00617.15
8.3.260.0090.01116.76
8.3.250.0090.01019.10
8.3.240.0130.00717.04
8.3.230.0130.00816.79
8.3.220.0110.00719.46
8.3.210.0050.00917.04
8.3.200.0070.00317.22
8.3.190.0070.00217.56
8.3.180.0130.00618.78
8.3.170.0130.00619.23
8.3.160.0080.01118.93
8.3.150.0100.01017.80
8.3.140.0080.00021.03
8.3.130.0030.00618.69
8.3.120.0030.00719.54
8.3.110.0100.01016.92
8.3.100.0030.00618.66
8.3.90.0130.00717.00
8.3.80.0060.01330.84
8.3.70.0290.01830.84
8.3.60.0450.00730.84
8.3.50.0160.00330.84
8.3.40.0280.01130.84
8.3.30.0330.01030.84
8.3.20.0210.02130.84
8.3.10.0380.00030.84
8.3.00.0430.00030.84
8.2.290.0120.00720.50
8.2.280.0120.00818.81
8.2.270.0110.00717.80
8.2.260.0040.00818.52
8.2.250.0050.00316.98
8.2.240.0160.00019.23
8.2.230.0100.01020.94
8.2.220.0060.00324.06
8.2.210.0070.01026.77
8.2.200.0300.01130.84
8.2.190.0340.00630.84
8.2.180.0370.00330.84
8.2.170.0410.00330.84
8.2.160.0350.00930.84
8.2.150.0380.00330.84
8.2.140.0290.01130.84
8.2.130.0300.00730.84
8.2.120.0180.01130.84
8.2.110.0400.00730.84
8.2.100.0430.01030.84
8.2.90.0340.00730.84
8.2.80.0340.00330.84
8.2.70.0260.00030.84
8.2.60.0370.00430.84
8.2.50.0280.01430.84
8.2.40.0290.01130.84
8.2.30.0320.00430.84
8.2.20.0320.00630.84
8.2.10.0210.01130.84
8.2.00.0190.01330.84
8.1.330.0100.00922.19
8.1.320.0130.00618.29
8.1.310.0090.00916.92
8.1.300.0110.00718.28
8.1.290.0340.00630.84
8.1.280.0290.01130.84
8.1.270.0370.00930.84
8.1.260.0380.00730.84
8.1.250.0360.00030.84
8.1.240.0340.01130.84
8.1.230.0250.01130.84
8.1.220.0270.00230.84
8.1.210.0170.00030.84
8.1.200.0100.00730.84
8.1.190.0230.00430.84
8.1.180.0130.00730.84
8.1.170.0080.01230.84
8.1.160.0170.00030.84
8.1.150.0140.00430.84
8.1.140.0320.00530.84
8.1.130.0250.01330.84
8.1.120.0310.00930.84
8.1.110.0400.00330.84
8.1.100.0260.01530.84
8.1.90.0260.00030.84
8.1.80.0140.00330.84
8.1.70.0160.00230.84
8.1.60.0170.00230.84
8.1.50.0340.00330.84
8.1.40.0300.00430.84
8.1.30.0330.00330.84
8.1.20.0370.00430.84
8.1.10.0280.01430.84
8.1.00.0360.00830.84

preferences:
36.21 ms | 403 KiB | 5 Q