3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = "<p class='description'><a data-ct='campaign_softlayer_inarticle_ad' target='_blank' href='someurl'><img class='lazy-img description' src='someurl' data-original='someurl' /></a></p>"; $dom = new DomDocument(); $dom->loadHtml($foo); $finder = new DomXPath($dom); $classname="description"; $nodes = $finder->query("//p[contains(@class, '$classname')]"); var_dump($nodes->length);

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.0100.01016.75
8.3.50.0140.00522.10
8.3.40.0000.01819.14
8.3.30.0040.01219.09
8.3.20.0040.00421.19
8.3.10.0070.00024.04
8.3.00.0040.00420.70
8.2.180.0170.00319.04
8.2.170.0070.00722.96
8.2.160.0100.01021.26
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00322.76
8.2.120.0050.00326.35
8.2.110.0030.00721.50
8.2.100.0060.00618.16
8.2.90.0050.00318.16
8.2.80.0050.00319.36
8.2.70.0030.00617.88
8.2.60.0000.00818.18
8.2.50.0040.00418.10
8.2.40.0000.00822.60
8.2.30.0070.00019.59
8.2.20.0040.00417.98
8.2.10.0040.00418.40
8.2.00.0000.00818.40
8.1.280.0040.01125.92
8.1.270.0030.00624.21
8.1.260.0020.00528.09
8.1.250.0040.00428.09
8.1.240.0040.00422.43
8.1.230.0000.01121.13
8.1.220.0040.00418.16
8.1.210.0040.00419.16
8.1.200.0090.00017.38
8.1.190.0040.00417.48
8.1.180.0040.00418.10
8.1.170.0000.00818.89
8.1.160.0050.00322.43
8.1.150.0080.00019.16
8.1.140.0040.00419.80
8.1.130.0030.00318.06
8.1.120.0060.00317.80
8.1.110.0000.00717.61
8.1.100.0040.00417.78
8.1.90.0040.00417.77
8.1.80.0000.00717.79
8.1.70.0070.00017.65
8.1.60.0030.00517.76
8.1.50.0000.00917.68
8.1.40.0040.00417.80
8.1.30.0000.00817.89
8.1.20.0040.00417.84
8.1.10.0030.00617.83
8.1.00.0040.00417.88
8.0.300.0000.00720.32
8.0.290.0040.00417.13
8.0.280.0000.00818.91
8.0.270.0000.00817.54
8.0.260.0000.00817.54
8.0.250.0000.00717.34
8.0.240.0000.00817.32
8.0.230.0030.00417.16
8.0.220.0000.00717.10
8.0.210.0000.00717.18
8.0.200.0030.00317.29
8.0.190.0040.00417.27
8.0.180.0000.00717.23
8.0.170.0000.00817.27
8.0.160.0070.00017.25
8.0.150.0040.00417.21
8.0.140.0000.00717.20
8.0.130.0030.00313.58
8.0.120.0050.00317.16
8.0.110.0040.00417.15
8.0.100.0080.00017.31
8.0.90.0000.00717.02
8.0.80.0120.00317.17
8.0.70.0040.00417.19
8.0.60.0030.00517.20
8.0.50.0040.00417.07
8.0.30.0120.00817.33
8.0.20.0100.00917.40
8.0.10.0040.00317.24
8.0.00.0090.00617.08
7.4.330.0030.00315.28
7.4.320.0000.00616.80
7.4.300.0000.00616.79
7.4.290.0030.00316.71
7.4.280.0000.00916.65
7.4.270.0070.00016.78
7.4.260.0070.00316.80
7.4.250.0050.00316.81
7.4.240.0040.00416.68
7.4.230.0030.00316.71
7.4.220.0100.00616.77
7.4.210.0150.00516.65
7.4.200.0050.00216.82
7.4.160.0100.00616.74
7.4.150.0150.01017.40
7.4.140.0080.01017.86
7.4.130.0050.01316.72
7.4.120.0110.01016.83
7.4.110.0130.00316.69
7.4.100.0120.00616.90
7.4.90.0090.01316.66
7.4.80.0100.00919.39
7.4.70.0100.00616.60
7.4.60.0030.01316.62
7.4.50.0060.00916.67
7.4.40.0040.01216.80
7.4.30.0070.01016.97
7.4.00.0090.00915.17
7.3.330.0020.00213.33
7.3.320.0030.00313.38
7.3.310.0080.00016.63
7.3.300.0070.00016.36
7.3.290.0080.00616.53
7.3.280.0080.00916.51
7.3.270.0060.01017.40
7.3.260.0090.00916.76
7.3.250.0120.00716.58
7.3.240.0090.00916.50
7.3.230.0080.00816.50
7.3.210.0110.00716.59
7.3.200.0140.00316.57
7.3.190.0060.01016.45
7.3.180.0030.01316.55
7.3.170.0120.01216.57
7.3.160.0060.01216.79
7.3.120.0060.00914.64
7.3.110.0070.00714.88
7.3.100.0020.01314.78
7.3.90.0050.01115.02
7.3.80.0050.01214.84
7.3.70.0040.01114.83
7.3.60.0050.01114.91
7.3.50.0100.00514.91
7.3.40.0060.00914.81
7.3.30.0070.00914.83
7.3.20.0060.00916.66
7.3.10.0040.00716.68
7.3.00.0100.00716.72
7.2.330.0130.00716.68
7.2.320.0060.01617.09
7.2.310.0040.01616.94
7.2.300.0030.01416.58
7.2.290.0060.00917.09
7.2.250.0090.00915.04
7.2.240.0020.01415.28
7.2.230.0090.00614.90
7.2.220.0070.00815.30
7.2.210.0090.00615.35
7.2.200.0070.00815.27
7.2.190.0070.00915.14
7.2.180.0020.01115.03
7.2.170.0080.00614.96
7.2.160.0080.00415.05
7.2.150.0040.01117.07
7.2.140.0060.01216.73
7.2.130.0000.01617.09
7.2.120.0040.01216.97
7.2.110.0070.01117.18
7.2.100.0000.01016.75
7.2.90.0070.01016.94
7.2.80.0040.01517.04
7.2.70.0000.01417.27
7.2.60.0030.00716.87
7.2.50.0090.00617.05
7.2.40.0070.01117.04
7.2.30.0100.00717.23
7.2.20.0040.01117.11
7.2.10.0070.00716.93
7.2.00.0030.01218.09
7.1.330.0070.00716.01
7.1.320.0080.00816.06
7.1.310.0080.00816.04
7.1.300.0050.00915.99
7.1.290.0020.01115.93
7.1.280.0110.00315.96
7.1.270.0030.00815.92
7.1.260.0080.00715.95
7.1.250.0070.00715.98
7.1.70.0050.00317.51
7.1.60.0080.00319.81
7.1.00.0070.07322.55
7.0.200.0150.00614.72
7.0.100.0200.07020.31
7.0.90.0130.06020.20
7.0.80.0070.06320.02
7.0.70.0130.05720.07
7.0.60.0130.05720.05
7.0.50.0330.04320.41
7.0.40.0170.06320.40
7.0.30.0130.06720.41
7.0.20.0230.06320.44
7.0.10.0230.07320.52
7.0.00.0100.06320.47
5.6.250.0100.08020.84
5.6.240.0030.07020.79
5.6.230.0070.06320.86
5.6.220.0130.05720.79
5.6.210.0070.06720.64
5.6.200.0100.06321.10
5.6.190.0200.05321.17
5.6.180.0100.07021.12
5.6.170.0100.08321.16
5.6.160.0030.08721.19
5.6.150.0200.05021.18
5.6.140.0100.06021.16
5.6.130.0170.05721.11
5.6.120.0100.07021.17
5.6.110.0100.09321.16
5.6.100.0300.05321.22
5.6.90.0130.06021.15
5.6.80.0100.08020.55
5.6.70.0170.08020.55
5.6.60.0130.05320.59
5.6.50.0200.05020.56
5.6.40.0130.07720.59
5.6.30.0170.05320.46
5.6.20.0130.07320.52
5.6.10.0270.06320.61
5.6.00.0170.05320.53

preferences:
32.2 ms | 401 KiB | 5 Q