3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div> <img src="icons/example.svg"> <a href="http://www.example.com">a link</a> <link href="css/example.css"> <iframe src="http://www.example.com/default.htm"></iframe> </div> HTML; $dom = new DOMDocument(); $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($dom); foreach ($xpath->query('//img/@src | //link/@href') as $attr) { $attr->value = "{{asset('" . $attr->value . ")'}}"; } echo substr($dom->saveXML(), 38); // remove the leading '<?xml version="1.0" standalone="yes"?>'

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.70.0000.01918.81
8.3.60.0060.00917.13
8.3.50.0060.01618.37
8.3.40.0140.00719.54
8.3.30.0140.00018.98
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0070.00725.92
8.2.170.0090.00622.96
8.2.160.0100.00322.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0060.00326.35
8.2.110.0060.00320.90
8.2.100.0120.00017.96
8.2.90.0030.00618.00
8.2.80.0040.00419.34
8.2.70.0080.00018.00
8.2.60.0040.00417.88
8.2.50.0050.00318.05
8.2.40.0000.00818.59
8.2.30.0050.00318.44
8.2.20.0050.00318.54
8.2.10.0000.00719.70
8.2.00.0000.00719.62
8.1.280.0120.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00819.26
8.1.230.0040.00723.06
8.1.220.0000.00818.90
8.1.210.0040.00418.77
8.1.200.0040.00417.91
8.1.190.0040.00417.73
8.1.180.0090.00019.21
8.1.170.0000.00817.72
8.1.160.0000.00722.67
8.1.150.0040.00419.21
8.1.140.0060.00319.31
8.1.130.0000.00720.54
8.1.120.0060.00317.75
8.1.110.0040.00417.89
8.1.100.0000.00717.77
8.1.90.0030.00417.86
8.1.80.0040.00417.91
8.1.70.0040.00417.74
8.1.60.0000.00818.01
8.1.50.0040.00417.84
8.1.40.0040.00417.92
8.1.30.0000.00817.93
8.1.20.0040.00417.95
8.1.10.0060.00317.87
8.1.00.0040.00417.78
8.0.300.0000.00718.77
8.0.290.0050.00317.13
8.0.280.0070.00018.86
8.0.270.0070.00018.52
8.0.260.0030.00320.63
8.0.250.0040.00417.31
8.0.240.0030.00517.41
8.0.230.0070.00017.42
8.0.220.0040.00417.32
8.0.210.0070.00017.38
8.0.200.0070.00017.44
8.0.190.0050.00217.31
8.0.180.0040.00417.25
8.0.170.0030.00617.35
8.0.160.0040.00417.39
8.0.150.0080.00017.32
8.0.140.0040.00417.28
8.0.130.0030.00313.75
8.0.120.0020.00517.36
8.0.110.0050.00317.46
8.0.100.0000.00717.33
8.0.90.0040.00417.41
8.0.80.0090.00517.29
8.0.70.0000.00717.19
8.0.60.0080.00017.48
8.0.50.0070.00017.20
8.0.30.0130.00617.46
8.0.20.0060.01317.54
8.0.10.0050.00217.38
8.0.00.0090.00917.17
7.4.330.0050.00015.55
7.4.320.0060.00016.79
7.4.300.0060.00016.94
7.4.290.0000.00717.03
7.4.280.0000.01016.87
7.4.270.0030.00316.86
7.4.260.0000.00513.62
7.4.250.0000.00716.96
7.4.240.0000.00716.92
7.4.230.0030.00616.64
7.4.220.0020.00617.03
7.4.210.0070.01116.86
7.4.200.0040.00416.86
7.4.130.0100.00816.98
7.4.120.0140.00816.77
7.4.110.0090.00916.81
7.4.100.0120.01216.74
7.4.90.0090.00917.00
7.4.80.0060.01319.39
7.4.70.0100.00716.71
7.4.60.0070.01116.64
7.4.50.0100.00716.79
7.4.40.0100.00716.46
7.4.30.0080.00916.59
7.4.20.0060.00916.77
7.4.10.0060.01316.79
7.4.00.0100.00616.70
7.3.330.0030.00616.49
7.3.320.0020.00213.49
7.3.310.0070.00016.62
7.3.300.0000.00716.48
7.3.290.0060.00916.66
7.3.260.0060.01316.77
7.3.240.0100.00916.69
7.3.230.0070.01516.62
7.3.210.0080.00816.79
7.3.200.0000.01616.93
7.3.190.0100.01016.76
7.3.180.0060.00916.79
7.3.170.0040.01116.51
7.3.160.0060.01316.76
7.3.150.0100.01016.55
7.3.140.0090.01216.65
7.3.130.0030.01816.80
7.3.120.0070.01016.73
7.3.110.0120.00616.66
7.3.100.0110.01116.77
7.3.90.0060.00916.59
7.3.80.0100.01016.73
7.3.70.0210.00016.48
7.3.60.0090.00816.68
7.3.50.0100.00616.61
7.3.40.0000.01616.63
7.3.30.0160.00616.70
7.3.20.0120.00616.61
7.3.10.0090.00916.70
7.3.00.0100.01016.83
7.2.330.0030.01417.00
7.2.320.0150.00917.15
7.2.310.0100.00717.00
7.2.300.0060.01016.96
7.2.290.0070.01116.83
7.2.280.0110.00716.78
7.2.270.0100.00717.03
7.2.260.0120.00916.93
7.2.250.0090.00917.01
7.2.240.0170.00617.13
7.2.230.0110.01316.65
7.2.220.0030.01416.98
7.2.210.0070.01417.02
7.2.200.0070.01016.85
7.2.190.0090.00916.95
7.2.180.0150.00416.93
7.2.170.0100.00717.07
7.2.160.0160.00317.07
7.2.150.0070.01317.00
7.2.140.0130.01116.90
7.2.130.0110.00716.91
7.2.120.0110.00817.09
7.2.110.0070.01016.89
7.2.100.0060.01217.10
7.2.90.0130.00317.00
7.2.80.0150.00316.96
7.2.70.0040.01317.11
7.2.60.0100.00716.79
7.2.50.0160.00516.76
7.2.40.0080.01617.08
7.2.30.0120.00616.98
7.2.20.0060.01116.63
7.2.10.0060.01216.99
7.2.00.0040.01316.78

preferences:
39.9 ms | 401 KiB | 5 Q