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; $doc = new DOMDocument(); $doc->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $dom->substituteEntities = false; $xpath = new DOMXPath($doc); foreach ($xpath->query('//img/@src | //link/@href') as $attr) { $attr->value = "{{asset('" . $attr->value . ")'}}"; } 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.0130.00917.00
8.3.50.0120.00918.44
8.3.40.0150.00019.56
8.3.30.0070.00719.09
8.3.20.0000.00724.18
8.3.10.0030.00524.66
8.3.00.0050.00326.16
8.2.180.0110.00425.92
8.2.170.0070.01022.96
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0100.00020.27
8.2.100.0080.00418.03
8.2.90.0060.00318.00
8.2.80.0080.00018.99
8.2.70.0000.00917.75
8.2.60.0080.00017.75
8.2.50.0000.00818.05
8.2.40.0030.00618.27
8.2.30.0080.00018.11
8.2.20.0040.00418.26
8.2.10.0040.00419.53
8.2.00.0040.00419.50
8.1.280.0060.01225.92
8.1.270.0080.00023.99
8.1.260.0040.00428.09
8.1.250.0100.00328.09
8.1.240.0100.01319.26
8.1.230.0070.00421.36
8.1.220.0050.00318.57
8.1.210.0000.00818.77
8.1.200.0030.00617.90
8.1.190.0000.00817.60
8.1.180.0060.00318.10
8.1.170.0040.00417.62
8.1.160.0040.00422.41
8.1.150.0000.00719.14
8.1.140.0090.00018.97
8.1.130.0000.00720.18
8.1.120.0090.00017.63
8.1.110.0000.00717.45
8.1.100.0050.00317.64
8.1.90.0050.00317.59
8.1.80.0000.00917.61
8.1.70.0050.00217.61
8.1.60.0000.00817.63
8.1.50.0000.00817.82
8.1.40.0000.00817.67
8.1.30.0040.00417.90
8.1.20.0090.00017.84
8.1.10.0000.00917.66
8.1.00.0070.00017.73
8.0.300.0030.00518.77
8.0.290.0080.00017.00
8.0.280.0030.00318.52
8.0.270.0070.00018.14
8.0.260.0030.00320.32
8.0.250.0030.00317.12
8.0.240.0080.00017.09
8.0.230.0040.00417.16
8.0.220.0040.00417.16
8.0.210.0040.00417.07
8.0.200.0000.00717.12
8.0.190.0000.00717.10
8.0.180.0070.00017.12
8.0.170.0030.00517.07
8.0.160.0000.00817.03
8.0.150.0030.00516.98
8.0.140.0040.00417.08
8.0.130.0060.00013.52
8.0.120.0040.00416.98
8.0.110.0000.00717.10
8.0.100.0000.00717.08
8.0.90.0030.00617.16
8.0.80.0060.00817.11
8.0.70.0080.00016.93
8.0.60.0080.00017.27
8.0.50.0040.00416.83
8.0.30.0150.00817.11
8.0.20.0120.00617.27
8.0.10.0000.00717.20
8.0.00.0120.00616.61
7.4.330.0050.00015.55
7.4.320.0060.00016.88
7.4.300.0030.00316.92
7.4.290.0000.00816.91
7.4.280.0030.00616.80
7.4.270.0000.00716.95
7.4.260.0000.00513.63
7.4.250.0040.00416.87
7.4.240.0040.00316.83
7.4.230.0030.00616.68
7.4.220.0020.00616.78
7.4.210.0090.01016.86
7.4.200.0070.00016.85
7.4.130.0130.00416.87
7.4.120.0110.01116.95
7.4.110.0070.01416.98
7.4.100.0110.01416.88
7.4.90.0030.01516.63
7.4.80.0070.01119.39
7.4.70.0120.00916.78
7.4.60.0080.00816.52
7.4.50.0140.00717.00
7.4.40.0120.01216.83
7.4.30.0110.01016.98
7.4.20.0150.00616.48
7.4.10.0130.00716.82
7.4.00.0090.00916.63
7.3.330.0000.00716.52
7.3.320.0030.00313.48
7.3.310.0030.00316.63
7.3.300.0000.00716.57
7.3.290.0060.01016.59
7.3.260.0060.01616.67
7.3.240.0100.00816.70
7.3.230.0160.00616.55
7.3.210.0080.00916.51
7.3.200.0110.00616.57
7.3.190.0130.00316.61
7.3.180.0030.01216.70
7.3.170.0150.00616.61
7.3.160.0150.00816.62
7.3.150.0130.00816.34
7.3.140.0120.00916.69
7.3.130.0140.00716.46
7.3.120.0260.00616.46
7.3.110.0030.01316.53
7.3.100.0030.01716.62
7.3.90.0120.00516.88
7.3.80.0110.00716.42
7.3.70.0070.01116.50
7.3.60.0180.00016.77
7.3.50.0070.01016.61
7.3.40.0050.01116.55
7.3.30.0070.01116.54
7.3.20.0060.01016.54
7.3.10.0070.01016.63
7.3.00.0090.00616.58
7.2.330.0110.00716.84
7.2.320.0070.01516.98
7.2.310.0090.00916.99
7.2.300.0120.01216.52
7.2.290.0160.00616.71
7.2.280.0160.00616.77
7.2.270.0120.00916.80
7.2.260.0160.00416.78
7.2.250.0150.01317.06
7.2.240.0130.01016.75
7.2.230.0140.00517.00
7.2.220.0060.01317.07
7.2.210.0110.01117.11
7.2.200.0080.01116.72
7.2.190.0150.00416.86
7.2.180.0090.00916.87
7.2.170.0110.00716.80
7.2.160.0090.00916.89
7.2.150.0120.00616.87
7.2.140.0060.01216.93
7.2.130.0130.00316.69
7.2.120.0090.00916.80
7.2.110.0120.00616.66
7.2.100.0100.00616.92
7.2.90.0070.01116.96
7.2.80.0080.00816.95
7.2.70.0120.00616.95
7.2.60.0150.00516.87
7.2.50.0150.00616.51
7.2.40.0150.00616.68
7.2.30.0160.00516.76
7.2.20.0130.00716.75
7.2.10.0100.01016.74
7.2.00.0170.00016.72

preferences:
59.48 ms | 400 KiB | 5 Q