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 . ")'}}"; } var_export(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.0040.01418.77
8.3.60.0150.00617.13
8.3.50.0090.00618.51
8.3.40.0070.01119.54
8.3.30.0100.00619.34
8.3.20.0080.00024.18
8.3.10.0060.00324.66
8.3.00.0050.00326.16
8.2.180.0110.00425.92
8.2.170.0100.00522.96
8.2.160.0000.01422.96
8.2.150.0080.00025.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0030.00722.75
8.2.100.0100.00318.03
8.2.90.0040.00418.30
8.2.80.0080.00018.43
8.2.70.0040.00418.00
8.2.60.0080.00017.88
8.2.50.0030.00518.05
8.2.40.0000.00918.53
8.2.30.0040.00418.56
8.2.20.0040.00418.45
8.2.10.0070.00019.67
8.2.00.0040.00419.61
8.1.280.0140.00725.92
8.1.270.0080.00023.99
8.1.260.0040.00428.09
8.1.250.0110.00428.09
8.1.240.0000.01019.66
8.1.230.0070.00419.65
8.1.220.0000.00818.18
8.1.210.0060.00318.77
8.1.200.0100.00017.72
8.1.190.0040.00417.73
8.1.180.0030.00619.38
8.1.170.0060.00317.97
8.1.160.0000.00722.60
8.1.150.0030.00519.36
8.1.140.0040.00419.31
8.1.130.0000.00720.46
8.1.120.0030.00517.76
8.1.110.0030.00517.75
8.1.100.0000.00717.89
8.1.90.0000.00717.87
8.1.80.0050.00317.89
8.1.70.0030.00517.91
8.1.60.0000.00817.90
8.1.50.0000.00817.82
8.1.40.0040.00417.99
8.1.30.0080.00018.11
8.1.20.0040.00417.96
8.1.10.0040.00518.00
8.1.00.0060.00317.94
8.0.300.0020.00520.15
8.0.290.0090.00017.13
8.0.280.0000.00718.72
8.0.270.0030.00318.45
8.0.260.0000.00720.63
8.0.250.0000.00717.37
8.0.240.0070.00017.32
8.0.230.0030.00317.31
8.0.220.0080.00017.32
8.0.210.0000.00717.24
8.0.200.0080.00017.43
8.0.190.0030.00617.45
8.0.180.0000.00917.28
8.0.170.0030.00517.25
8.0.160.0050.00217.39
8.0.150.0000.00817.18
8.0.140.0040.00417.21
8.0.130.0030.00313.88
8.0.120.0040.00417.27
8.0.110.0040.00417.13
8.0.100.0040.00417.34
8.0.90.0060.00317.30
8.0.80.0070.00717.32
8.0.70.0050.00317.38
8.0.60.0050.00317.25
8.0.50.0040.00417.27
8.0.30.0130.00717.48
8.0.20.0060.01317.76
8.0.10.0040.00417.59
8.0.00.0110.00717.30
7.4.330.0000.00515.55
7.4.320.0030.00316.87
7.4.300.0000.00617.02
7.4.290.0000.00816.76
7.4.280.0030.00617.06
7.4.270.0070.00017.06
7.4.260.0000.00513.66
7.4.250.0060.00316.84
7.4.240.0050.00316.96
7.4.230.0090.00016.97
7.4.220.0060.00216.87
7.4.210.0070.00916.93
7.4.200.0040.00416.96
7.4.130.0110.00616.98
7.4.120.0080.01216.81
7.4.110.0080.00916.76
7.4.100.0080.00816.99
7.4.90.0160.00717.16
7.4.80.0030.01419.39
7.4.70.0070.01017.01
7.4.60.0110.00816.60
7.4.50.0130.00616.67
7.4.40.0100.00616.75
7.4.30.0110.00516.82
7.4.20.0040.01216.85
7.4.10.0030.01216.86
7.4.00.0110.00616.88
7.3.330.0030.00316.75
7.3.320.0050.00013.43
7.3.310.0000.00716.62
7.3.300.0000.00716.55
7.3.290.0110.00816.69
7.3.260.0120.01216.74
7.3.240.0120.00816.69
7.3.230.0130.00516.83
7.3.210.0110.00816.63
7.3.200.0030.01316.89
7.3.190.0110.00916.80
7.3.180.0030.01216.77
7.3.170.0090.00616.76
7.3.160.0040.01116.58
7.3.150.0120.00316.54
7.3.140.0090.00916.58
7.3.130.0110.00516.55
7.3.120.0040.01316.62
7.3.110.0040.01216.68
7.3.100.0030.01416.63
7.3.90.0090.00916.75
7.3.80.0030.01316.72
7.3.70.0040.01316.42
7.3.60.0120.00316.71
7.3.50.0060.01016.59
7.3.40.0100.00516.71
7.3.30.0090.00616.64
7.3.20.0060.00916.79
7.3.10.0000.01616.74
7.3.00.0110.00616.58
7.2.330.0060.01617.15
7.2.320.0120.01217.20
7.2.310.0110.00816.98
7.2.300.0080.00816.87
7.2.290.0120.00316.87
7.2.280.0120.00317.00
7.2.270.0140.00316.85
7.2.260.0120.00416.75
7.2.250.0130.00316.97
7.2.240.0060.01216.93
7.2.230.0090.00916.90
7.2.220.0090.00916.84
7.2.210.0120.00616.81
7.2.200.0000.01616.77
7.2.190.0170.00016.93
7.2.180.0060.00916.94
7.2.170.0000.01617.07
7.2.160.0120.00316.87
7.2.150.0100.00617.15
7.2.140.0080.00817.00
7.2.130.0450.00616.85
7.2.120.0030.01317.10
7.2.110.0080.00816.75
7.2.100.0130.00317.09
7.2.90.0100.01016.95
7.2.80.0060.01417.04
7.2.70.0120.00617.14
7.2.60.0080.01016.93
7.2.50.0100.00816.79
7.2.40.0130.00716.85
7.2.30.0110.00716.71
7.2.20.0140.00416.74
7.2.10.0080.01116.79
7.2.00.0120.00516.91

preferences:
37.6 ms | 401 KiB | 5 Q