3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Lorem ipsum dolor sit amet, adipisicing <img src="http://example.com/img.jpg" />consequat.'; $dom = new DOMDocument; $dom->loadHTML($str); echo (new DOMXPath($dom))->evaluate('string(//img/@src)');

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.00.0150.00720.29
8.4.150.0030.00014.05
8.4.140.0100.01117.96
8.4.130.0050.00518.09
8.4.120.0100.00722.46
8.4.110.0080.00722.95
8.4.100.0110.01018.15
8.4.90.0090.00819.39
8.4.80.0110.00418.15
8.4.70.0060.00518.02
8.4.60.0130.00818.17
8.4.50.0110.00819.87
8.4.40.0150.00518.79
8.4.30.0140.00718.47
8.4.20.0160.00518.84
8.4.10.0110.00618.78
8.3.280.0110.00818.64
8.3.270.0140.00517.04
8.3.260.0130.00717.06
8.3.250.0120.00719.02
8.3.240.0140.00616.70
8.3.230.0160.00616.47
8.3.220.0080.00718.05
8.3.210.0090.00417.87
8.3.200.0140.00616.93
8.3.190.0130.00917.43
8.3.180.0060.00317.59
8.3.170.0120.00318.69
8.3.160.0110.00417.91
8.3.150.0140.00717.22
8.3.140.0120.00518.95
8.3.130.0140.00117.82
8.3.120.0120.00317.96
8.3.110.0090.00617.76
8.3.100.0080.00816.62
8.3.90.0110.00621.71
8.3.80.0130.00316.72
8.3.70.0130.00616.57
8.3.60.0170.00617.60
8.3.50.0110.00516.82
8.3.40.0090.00719.81
8.3.30.0160.00318.59
8.3.20.0160.00420.81
8.3.10.0120.00519.92
8.3.00.0070.00719.26
8.2.290.0160.00117.21
8.2.280.0100.00618.99
8.2.270.0100.00818.14
8.2.260.0080.00518.58
8.2.250.0100.00716.99
8.2.240.0090.00917.89
8.2.230.0100.00718.94
8.2.220.0110.00320.45
8.2.210.0090.00521.68
8.2.200.0120.00316.72
8.2.190.0130.00616.71
8.2.180.0170.00116.89
8.2.170.0130.00519.35
8.2.160.0120.00519.10
8.2.150.0100.00219.50
8.2.140.0090.00420.12
8.2.130.0070.00519.96
8.2.120.0090.00420.48
8.2.110.0050.00820.43
8.2.100.0100.00220.44
8.2.90.0080.00420.38
8.2.80.0070.00520.38
8.2.70.0070.00520.26
8.2.60.0080.00520.14
8.2.50.0060.00619.50
8.2.40.0070.00619.42
8.2.30.0050.00719.29
8.2.20.0100.00518.99
8.2.10.0090.00319.19
8.2.00.0040.00819.18
8.1.330.0100.00716.26
8.1.320.0110.00716.47
8.1.310.0070.00617.67
8.1.300.0110.00316.35
8.1.290.0080.00623.65
8.1.280.0140.00621.21
8.1.270.0120.00420.83
8.1.260.0140.00321.74
8.1.250.0100.00620.98
8.1.240.0110.00518.90
8.1.230.0130.00319.23
8.1.220.0080.00719.38
8.1.210.0110.00518.81
8.1.200.0050.01118.95
8.1.190.0080.00819.04
8.1.180.0090.00818.94
8.1.170.0120.00519.00
8.1.160.0100.00619.85
8.1.150.0100.00619.06
8.1.140.0080.00819.95
8.1.130.0120.00419.16
8.1.120.0100.00618.93
8.1.110.0140.00318.99
8.1.100.0130.00219.61
8.1.90.0110.00419.01
8.1.80.0070.01019.68
8.1.70.0130.00519.14
8.1.60.0150.00219.08
8.1.50.0140.00419.07
8.1.40.0110.00519.08
8.1.30.0070.00919.21
8.1.20.0100.00619.74
8.1.10.0120.00519.10
8.1.00.0100.00719.10

preferences:
39.89 ms | 403 KiB | 5 Q