3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<HTML This is some sample data which is going to contain an image in the format <img src="http://www.randomdomain.com/randomfolder/randomimagename.jpg">. It will also contain lots of other text and maybe another image or two like this: <img alt='another image' src='http://www.example.com/randomfolder/randomimagename.jpg'> HTML; $srcs = []; $dom=new DOMDocument; $dom->loadHTML($string); foreach ($dom->getElementsByTagName('img') as $img) { $srcs[] = $img->getAttribute('src'); } var_export($srcs);

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.120.0090.01120.79
8.4.110.0120.00818.94
8.4.100.0130.00817.96
8.4.90.0110.00920.64
8.4.80.0160.00618.04
8.4.70.0070.00318.01
8.4.60.0120.00717.66
8.4.50.0090.01219.62
8.4.40.0070.01319.60
8.4.30.0100.01019.33
8.4.20.0100.01020.44
8.4.10.0000.00917.72
8.3.250.0130.00519.28
8.3.240.0050.00416.96
8.3.230.0120.00816.52
8.3.220.0030.00717.27
8.3.210.0110.00716.63
8.3.200.0080.01116.95
8.3.190.0080.01318.51
8.3.180.0080.00116.78
8.3.170.0060.01316.68
8.3.160.0120.00618.83
8.3.150.0120.00817.57
8.3.140.0040.00419.24
8.3.130.0040.00417.20
8.3.120.0060.00319.28
8.3.110.0040.00420.94
8.3.100.0080.00024.06
8.3.90.0040.00426.77
8.3.80.0040.00717.97
8.3.70.0090.00916.75
8.3.60.0060.00918.31
8.3.50.0080.00518.46
8.3.40.0110.00419.22
8.3.30.0040.01118.79
8.3.20.0040.00419.39
8.3.10.0070.00023.81
8.3.00.0080.00021.02
8.2.290.0030.00720.98
8.2.280.0070.00218.85
8.2.270.0000.01016.85
8.2.260.0060.00316.82
8.2.250.0030.00617.05
8.2.240.0080.00317.44
8.2.230.0090.00022.58
8.2.220.0040.00737.54
8.2.210.0070.00726.77
8.2.200.0080.00018.66
8.2.190.0110.00718.79
8.2.180.0110.00425.92
8.2.170.0100.01022.96
8.2.160.0030.01022.33
8.2.150.0110.00724.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00021.04
8.2.110.0060.00319.46
8.2.100.0110.00018.41
8.2.90.0050.00317.88
8.2.80.0000.00817.97
8.2.70.0070.00318.18
8.2.60.0030.00618.28
8.2.50.0000.00918.10
8.2.40.0030.00621.13
8.2.30.0000.00819.55
8.2.20.0030.00620.20
8.2.10.0050.00218.48
8.2.00.0050.00419.74
8.1.330.0140.00620.61
8.1.320.0130.00716.57
8.1.310.0040.00417.13
8.1.300.0100.00718.34
8.1.290.0030.00618.88
8.1.280.0060.00825.92
8.1.270.0080.00022.30
8.1.260.0040.00426.35
8.1.250.0040.01128.09
8.1.240.0080.00417.73
8.1.230.0100.00017.95
8.1.220.0050.00317.89
8.1.210.0080.00018.77
8.1.200.0040.00417.36
8.1.190.0030.00517.47
8.1.180.0040.00418.10
8.1.170.0040.00418.81
8.1.160.0000.00719.04
8.1.150.0040.00419.12
8.1.140.0000.00822.25
8.1.130.0060.00320.37
8.1.120.0000.00717.72
8.1.110.0040.00417.60
8.1.100.0040.00417.68
8.1.90.0060.00317.71
8.1.80.0040.00417.64
8.1.70.0000.00717.71
8.1.60.0080.00017.89
8.1.50.0050.00517.78
8.1.40.0040.00417.73
8.1.30.0060.00317.85
8.1.20.0070.00017.82
8.1.10.0070.00017.84
8.1.00.0030.00517.73
8.0.300.0020.00518.77
8.0.290.0040.00416.88
8.0.280.0030.00518.59
8.0.270.0030.00318.31
8.0.260.0030.00318.62
8.0.250.0020.00517.13
8.0.240.0030.00517.16
8.0.230.0040.00317.24
8.0.220.0000.00717.15
8.0.210.0070.00017.02
8.0.200.0000.00617.17
8.0.190.0000.00817.27
8.0.180.0000.00717.17
8.0.170.0000.00917.02
8.0.160.0070.00017.17
8.0.150.0000.01317.02
8.0.140.0040.00417.01
8.0.130.0060.00013.62
8.0.120.0070.00317.16
8.0.110.0000.00817.17
8.0.100.0040.00417.11
8.0.90.0050.00216.96
8.0.80.0070.00717.11
8.0.70.0050.00217.20
8.0.60.0040.00417.29
8.0.50.0040.00417.16
8.0.30.0070.01017.44
8.0.20.0090.00917.40
8.0.10.0040.00417.21
8.0.00.0120.00617.12
7.4.330.0020.00215.55
7.4.320.0060.00016.57
7.4.300.0070.00016.82
7.4.290.0030.00616.62
7.4.280.0040.00416.71
7.4.270.0070.00316.81
7.4.260.0030.00316.70
7.4.250.0000.00016.81
7.4.240.0030.00316.77
7.4.230.0040.00416.56
7.4.220.0040.00416.89
7.4.210.0070.01216.70
7.4.200.0000.00816.93
7.4.160.0110.00816.82
7.4.140.0110.00717.86
7.4.130.0060.01116.68
7.4.120.0100.01016.83
7.4.110.0040.01516.82
7.4.100.0100.00716.95
7.4.90.0150.00716.73
7.4.80.0070.01819.39
7.4.70.0030.01416.85
7.4.60.0060.01116.71
7.4.50.0030.01116.48
7.4.40.0150.00316.71
7.4.00.0060.01015.21
7.3.330.0050.00013.34
7.3.320.0000.00613.35
7.3.310.0020.00516.42
7.3.300.0030.00316.40
7.3.290.0000.00716.50
7.3.280.0060.01216.52
7.3.260.0080.00916.62
7.3.240.0100.00816.66
7.3.230.0090.00916.55
7.3.210.0070.01416.57
7.3.200.0070.01016.45
7.3.190.0140.01016.68
7.3.180.0110.00416.44
7.3.170.0180.00416.71
7.3.160.0030.01516.64
7.3.10.0060.00616.67
7.3.00.0100.00316.50
7.2.330.0030.01616.84
7.2.320.0150.00616.91
7.2.310.0090.00917.00
7.2.300.0040.01517.10
7.2.290.0140.00316.88
7.2.130.0060.00916.99
7.2.120.0290.00815.88
7.2.110.0260.00515.82
7.2.100.0220.00715.98
7.2.90.0270.01016.02
7.2.80.0280.00315.87
7.2.70.0200.01116.18
7.2.60.0220.00816.12
7.2.50.0460.00516.09
7.2.40.0340.00516.18
7.2.30.0310.01116.15
7.2.20.0390.00316.22
7.2.10.0240.00616.07
7.2.00.0320.00316.08
7.1.250.0030.01215.54
7.1.240.0370.00714.16
7.1.230.0470.00313.75
7.1.220.0410.00714.11
7.1.210.0410.00313.96
7.1.200.0450.00613.92
7.1.190.0550.00314.02
7.1.180.0480.01014.09
7.1.170.0560.00314.20
7.1.160.0440.00914.07
7.1.150.0490.00714.20
7.1.140.0400.01013.76
7.1.130.0490.00714.07
7.1.120.0380.01013.89
7.1.110.0370.01014.09
7.1.100.1190.00713.92
7.1.90.0360.01013.97
7.1.80.0350.00913.82
7.1.70.0400.00413.86
7.1.60.0600.00914.01
7.1.50.0460.00013.97
7.1.40.0430.00613.64
7.1.30.0410.00613.87
7.1.20.0410.00313.90
7.1.10.0360.00713.69
7.1.00.0410.00313.87
5.6.380.0100.00714.52

preferences:
26.94 ms | 403 KiB | 5 Q