3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div> <img src="icons/example.svg"> <img src="{{asset('icons/example.svg')}}"/> <a href="http://www.example.com">a link</a> <link href="css/example.css"> <link href="{{asset('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[not(starts-with(@src,"{{asset"))]/@src | //link[not(starts-with(@href,"{{asset"))]/@href') as $attr) { $attr->value = "{{asset('" . $attr->value . "')}}"; } echo substr($dom->saveXML(), 38); // remove the auto-generated xml tag from the start

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.0220.00016.88
8.3.50.0150.00018.71
8.3.40.0120.00619.72
8.3.30.0040.01119.39
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.180.0110.00725.92
8.2.170.0090.00622.96
8.2.160.0070.00722.96
8.2.150.0030.00625.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00226.35
8.2.110.0030.00722.75
8.2.100.0080.00418.09
8.2.90.0030.00518.22
8.2.80.0080.00018.30
8.2.70.0080.00019.68
8.2.60.0030.00518.00
8.2.50.0040.00417.88
8.2.40.0000.00819.64
8.2.30.0070.00018.56
8.2.20.0040.00418.43
8.2.10.0050.00219.58
8.2.00.0040.00419.75
8.1.280.0070.00725.92
8.1.270.0120.00623.99
8.1.260.0030.00528.09
8.1.250.0050.00328.09
8.1.240.0060.00322.89
8.1.230.0060.00621.41
8.1.220.0000.00818.29
8.1.210.0080.00319.41
8.1.200.0060.00317.85
8.1.190.0070.00317.85
8.1.180.0000.00818.10
8.1.170.0060.00317.75
8.1.160.0050.00319.21
8.1.150.0040.00419.25
8.1.140.0040.00419.40
8.1.130.0000.00717.86
8.1.120.0040.00417.89
8.1.110.0000.00817.73
8.1.100.0040.00417.90
8.1.90.0000.00817.76
8.1.80.0000.00917.78
8.1.70.0030.00317.89
8.1.60.0040.00417.83
8.1.50.0040.00417.88
8.1.40.0030.00517.82
8.1.30.0040.00417.93
8.1.20.0030.00618.08
8.1.10.0000.00817.95
8.1.00.0040.00417.94
8.0.300.0040.00420.59
8.0.290.0040.00417.25
8.0.280.0070.00018.77
8.0.270.0000.00718.39
8.0.260.0040.00417.26
8.0.250.0030.00317.36
8.0.240.0030.00617.37
8.0.230.0030.00317.44
8.0.220.0000.00717.40
8.0.210.0000.00717.27
8.0.200.0040.00417.40
8.0.190.0000.00717.45
8.0.180.0040.00417.32
8.0.170.0060.00317.40
8.0.160.0070.00017.29
8.0.150.0070.00017.29
8.0.140.0030.00617.21
8.0.130.0000.00613.85
8.0.120.0030.00617.35
8.0.110.0000.00817.45
8.0.100.0050.00317.30
8.0.90.0030.00617.43
8.0.80.0080.00617.28
8.0.70.0000.00717.37
8.0.60.0040.00417.24
8.0.50.0070.00017.26
8.0.30.0110.02017.54
8.0.20.0100.00917.62
8.0.10.0030.00517.41
8.0.00.0090.00917.13
7.4.330.0020.00215.55
7.4.320.0030.00317.00
7.4.300.0050.00216.99
7.4.290.0050.00316.99
7.4.280.0060.00316.79
7.4.270.0030.00316.87
7.4.260.0050.00013.64
7.4.250.0000.00716.91
7.4.240.0040.00317.04
7.4.230.0090.00017.06
7.4.220.0030.00316.91
7.4.210.0060.01117.04
7.4.200.0040.00417.04
7.4.130.0150.00316.79
7.4.120.0070.01116.93
7.4.110.0070.01117.09
7.4.100.0120.00617.05
7.4.90.0120.00616.82
7.4.80.0060.01219.39
7.4.70.0140.00816.95
7.4.60.0140.00916.55
7.4.50.0070.01116.79
7.4.40.0140.00316.74
7.4.30.0120.00616.77
7.4.20.0040.01216.74
7.4.10.0110.00516.86
7.4.00.0040.01316.86
7.3.330.0070.00016.70
7.3.320.0000.00613.38
7.3.310.0000.00716.53
7.3.300.0070.00016.66
7.3.290.0060.00916.65
7.3.260.0090.01116.67
7.3.240.0110.00616.75
7.3.230.0130.00316.91
7.3.210.0120.00616.78
7.3.200.0000.02216.91
7.3.190.0110.01116.75
7.3.180.0100.00716.66
7.3.170.0090.00916.79
7.3.160.0140.00316.49
7.3.150.0140.00316.47
7.3.140.0070.01116.66
7.3.130.0080.00816.68
7.3.120.0140.00316.73
7.3.110.0120.00716.41
7.3.100.0050.01116.42
7.3.90.0080.00816.56
7.3.80.0110.00716.50
7.3.70.0060.01116.65
7.3.60.0090.00816.60
7.3.50.0110.00816.57
7.3.40.0110.00516.46
7.3.30.0130.00316.79
7.3.20.0030.01316.62
7.3.10.0150.00316.66
7.3.00.0130.01016.65
7.2.330.0090.00917.12
7.2.320.0060.01316.90
7.2.310.0120.00416.58
7.2.300.0110.00717.16
7.2.290.0140.00416.91
7.2.280.0080.00817.04
7.2.270.0070.01016.86
7.2.260.0030.01417.13
7.2.250.0100.00716.98
7.2.240.0130.01216.79
7.2.230.0050.01116.77
7.2.220.0120.00417.01
7.2.210.0030.02016.77
7.2.200.0100.01016.99
7.2.190.0070.01016.79
7.2.180.0090.00916.95
7.2.170.0120.00316.96
7.2.160.0030.01316.83
7.2.150.0250.01217.02
7.2.140.0100.01416.90
7.2.130.0100.01317.13
7.2.120.0130.00416.98
7.2.110.0100.00716.92
7.2.100.0070.01716.96
7.2.90.0130.01016.89
7.2.80.0060.01216.90
7.2.70.0070.01017.16
7.2.60.0050.01116.87
7.2.50.0070.01016.76
7.2.40.0110.00616.82
7.2.30.0140.00317.11
7.2.20.0100.00616.53
7.2.10.0090.00916.85
7.2.00.0120.00516.98

preferences:
64.84 ms | 400 KiB | 5 Q