3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '<img src="https://example.com/123456789/300.jpg?key=abcdefg" /> <img src="https://example.com/123456789/600.jpg?key=abcdefg" /> <img src="https://example.com/123456789/900.jpg?key=abcdefg" /> <img src="https://example.com/123456789/1200.jpg?key=abcdefg" />'; $dom = new DOMDocument; $dom->loadHTML($string); $images = $dom->getElementsByTagName('img'); foreach($images as $image) { echo $image->getAttribute('src') . PHP_EOL; }

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.4.140.0140.00717.59
8.4.130.0070.00217.80
8.4.120.0060.00324.40
8.4.110.0080.00819.14
8.4.100.0130.00817.94
8.4.90.0130.00720.88
8.4.80.0040.00619.19
8.4.70.0130.00319.02
8.4.60.0070.00219.15
8.4.50.0100.01218.81
8.4.40.0070.00317.62
8.4.30.0100.01017.83
8.4.20.0090.00919.84
8.4.10.0030.00617.81
8.3.270.0120.00916.59
8.3.260.0130.00816.79
8.3.250.0120.00519.08
8.3.240.0110.00717.26
8.3.230.0120.00717.00
8.3.220.0090.00819.09
8.3.210.0080.00816.72
8.3.200.0060.00416.61
8.3.190.0050.00419.07
8.3.180.0080.00118.57
8.3.170.0110.00720.90
8.3.160.0100.00618.25
8.3.150.0090.00616.67
8.3.140.0070.00717.14
8.3.130.0030.00618.73
8.3.120.0080.00319.04
8.3.110.0000.00820.94
8.3.100.0040.01124.06
8.3.90.0120.00626.77
8.3.80.0000.00918.55
8.3.70.0040.01116.75
8.3.60.0110.00418.68
8.3.50.0110.00417.99
8.3.40.0040.01218.92
8.3.30.0040.01118.87
8.3.20.0070.00319.26
8.3.10.0090.00019.46
8.3.00.0060.00323.70
8.2.290.0130.00617.04
8.2.280.0040.00418.73
8.2.270.0060.01319.20
8.2.260.0120.00616.90
8.2.250.0030.00616.88
8.2.240.0000.00917.46
8.2.230.0070.00422.58
8.2.220.0090.00037.54
8.2.210.0030.01626.77
8.2.200.0030.00716.75
8.2.190.0160.00317.00
8.2.180.0120.00316.75
8.2.170.0180.00422.96
8.2.160.0180.00019.64
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.01319.98
8.2.120.0000.00726.35
8.2.110.0090.00021.09
8.2.100.0060.00619.76
8.2.90.0070.00319.17
8.2.80.0030.00518.02
8.2.70.0000.00917.75
8.2.60.0030.00518.17
8.2.50.0060.00318.07
8.2.40.0040.00418.34
8.2.30.0070.00418.33
8.2.20.0040.00418.19
8.2.10.0040.00418.32
8.2.00.0050.00319.64
8.1.330.0120.00816.98
8.1.320.0040.00418.13
8.1.310.0120.00618.73
8.1.300.0110.00718.30
8.1.290.0000.01130.84
8.1.280.0090.00625.92
8.1.270.0080.00022.30
8.1.260.0080.00026.35
8.1.250.0000.00928.09
8.1.240.0090.00021.11
8.1.230.0040.00722.37
8.1.220.0000.00817.91
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0050.00318.75
8.1.160.0030.00919.14
8.1.150.0040.00419.16
8.1.140.0000.00717.84
8.1.130.0000.00819.24
8.1.120.0070.00317.69
8.1.110.0090.00017.61
8.1.100.0090.00017.56
8.1.90.0050.00217.63
8.1.80.0040.00417.71
8.1.70.0000.00717.61
8.1.60.0040.00717.80
8.1.50.0000.00717.77
8.1.40.0040.00417.74
8.1.30.0030.00617.92
8.1.20.0070.00017.75
8.1.10.0040.00417.71
8.1.00.0040.00417.66
8.0.300.0040.00418.77
8.0.290.0000.01516.75
8.0.280.0030.00318.57
8.0.270.0050.00217.40
8.0.260.0060.00317.38
8.0.250.0040.00417.09
8.0.240.0000.00917.15
8.0.230.0000.00717.17
8.0.220.0030.00617.11
8.0.210.0030.00317.13
8.0.200.0000.00716.99
8.0.190.0060.00317.10
8.0.180.0040.00417.05
8.0.170.0030.00616.99
8.0.160.0070.00017.10
8.0.150.0040.00716.91
8.0.140.0000.00817.07
8.0.130.0060.00013.50
8.0.120.0060.00317.09
8.0.110.0040.00417.03
8.0.100.0000.00817.05
8.0.90.0040.00416.89
8.0.80.0070.00917.12
8.0.70.0000.00717.12
8.0.60.0080.00016.96
8.0.50.0030.00517.00
8.0.30.0110.01017.37
8.0.20.0050.01417.40
8.0.10.0040.00417.05
8.0.00.0110.00516.92
7.4.330.0000.00515.55
7.4.320.0060.00016.79
7.4.300.0000.00716.72
7.4.290.0000.00716.79
7.4.280.0000.00816.70
7.4.270.0030.00316.73
7.4.260.0030.00316.73
7.4.250.0040.00416.73
7.4.240.0050.00216.84
7.4.230.0070.00016.47
7.4.220.0030.00616.81
7.4.210.0070.00816.89
7.4.200.0030.00316.78
7.4.160.0080.00916.77
7.4.140.0090.01017.86
7.4.130.0140.00316.85
7.4.120.0120.00716.70
7.4.110.0070.01016.58
7.4.100.0100.00716.86
7.4.90.0130.01816.76
7.4.80.0120.01219.39
7.4.70.0100.00716.79
7.4.60.0060.01016.70
7.4.50.0040.01516.80
7.4.40.0110.00516.50
7.4.00.0080.00915.09
7.3.330.0000.00613.33
7.3.320.0020.00213.36
7.3.310.0030.00316.50
7.3.300.0030.00316.45
7.3.290.0000.00716.49
7.3.280.0090.00816.52
7.3.260.0090.01416.64
7.3.240.0120.00616.64
7.3.230.0070.01016.43
7.3.210.0160.00316.88
7.3.200.0040.01216.83
7.3.190.0000.01716.77
7.3.180.0080.00816.49
7.3.170.0120.00616.46
7.3.160.0110.00516.47
7.3.120.0070.01114.83
7.3.110.0070.01014.63
7.3.100.0040.01214.99
7.3.90.0060.00314.87
7.3.80.0040.01415.09
7.3.70.0000.01514.75
7.3.60.0060.00914.81
7.3.50.0100.00614.96
7.3.40.0030.01615.01
7.3.30.0040.00814.96
7.3.20.0040.01116.73
7.3.10.0030.01416.61
7.3.00.0000.01116.70
7.2.330.0150.00616.88
7.2.320.0070.01716.91
7.2.310.0140.00416.77
7.2.300.0110.00616.67
7.2.290.0110.01116.76
7.2.250.0070.01415.23
7.2.240.0100.01015.04
7.2.230.0040.01115.13
7.2.220.0040.00415.20
7.2.210.0040.01114.95
7.2.200.0060.00915.19
7.2.190.0040.01415.30
7.2.180.0060.00915.16
7.2.170.0060.00614.96
7.2.80.0110.00416.74
7.2.60.0940.00715.07
7.2.50.1010.00715.24
7.2.40.1090.00515.23
7.2.30.0920.00714.90
7.2.20.1340.00815.19
7.2.10.1210.00814.96
7.2.00.1140.00814.89
7.1.330.0100.00315.92
7.1.320.0030.00715.67
7.1.310.0070.01015.66
7.1.300.0100.00315.79
7.1.290.0060.01015.79
7.1.280.0060.00615.75
7.1.270.0070.00415.64
7.1.260.0080.00416.07
7.1.200.0040.00415.79
7.1.170.0840.00914.10
7.1.160.1010.01113.93
7.1.150.1120.01014.20
7.1.140.1050.00713.93
7.1.130.1270.01114.07
7.1.120.2200.00814.15
7.1.110.1000.00814.00
7.1.100.1100.01114.05
7.1.90.1010.00914.08
7.1.80.0950.00913.95
7.1.70.1140.00714.18
7.1.60.1220.00932.05
7.1.50.1280.01031.47
7.1.40.1400.01331.86
7.1.30.1210.01631.55
7.1.20.1270.01331.49
7.1.10.1110.00913.70
7.1.00.1360.00613.87

preferences:
43.18 ms | 403 KiB | 5 Q