3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = "<p class='xdescriptionx'><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.70.0110.00418.43
8.3.60.0070.01316.88
8.3.50.0140.00622.02
8.3.40.0150.00419.22
8.3.30.0070.01119.01
8.3.20.0000.00721.04
8.3.10.0080.00024.04
8.3.00.0080.00021.02
8.2.180.0100.01017.00
8.2.170.0120.00322.96
8.2.160.0140.00721.70
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0080.00022.63
8.2.120.0040.00426.35
8.2.110.0000.00922.62
8.2.100.0040.00818.16
8.2.90.0030.00619.47
8.2.80.0030.00517.97
8.2.70.0090.00017.88
8.2.60.0060.00318.18
8.2.50.0080.00018.07
8.2.40.0000.00918.42
8.2.30.0040.00418.36
8.2.20.0040.00418.00
8.2.10.0040.00418.46
8.2.00.0060.00318.45
8.1.280.0070.00725.92
8.1.270.0000.00824.14
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0090.00020.89
8.1.230.0090.00317.89
8.1.220.0050.00318.02
8.1.210.0060.00318.77
8.1.200.0060.00317.60
8.1.190.0040.00417.60
8.1.180.0080.00018.10
8.1.170.0000.00918.90
8.1.160.0080.00019.12
8.1.150.0000.00719.19
8.1.140.0020.00519.84
8.1.130.0070.00017.97
8.1.120.0050.00517.68
8.1.110.0000.00717.80
8.1.100.0030.00317.80
8.1.90.0000.00817.66
8.1.80.0050.00317.71
8.1.70.0040.00417.65
8.1.60.0080.00017.88
8.1.50.0030.00617.84
8.1.40.0080.00017.82
8.1.30.0080.00017.88
8.1.20.0000.00817.75
8.1.10.0040.00417.82
8.1.00.0000.00817.90
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.82
8.0.270.0000.00817.59
8.0.260.0070.00017.47
8.0.250.0000.00717.30
8.0.240.0080.00017.34
8.0.230.0000.00717.18
8.0.220.0000.00717.11
8.0.210.0030.00317.10
8.0.200.0000.00617.31
8.0.190.0040.00417.16
8.0.180.0070.00017.20
8.0.170.0030.00517.15
8.0.160.0000.00717.13
8.0.150.0040.00417.24
8.0.140.0000.00817.07
8.0.130.0030.00313.70
8.0.120.0030.00517.09
8.0.110.0000.00717.16
8.0.100.0040.00417.36
8.0.90.0000.00717.06
8.0.80.0040.01117.13
8.0.70.0050.00217.16
8.0.60.0040.00417.13
8.0.50.0040.00417.22
8.0.30.0110.00917.33
8.0.20.0110.00917.68
8.0.10.0040.00417.12
8.0.00.0100.00716.93
7.4.330.0000.00515.46
7.4.320.0050.00316.84
7.4.300.0030.00316.70
7.4.290.0070.00016.82
7.4.280.0030.00516.75
7.4.270.0030.00316.93
7.4.260.0000.00716.74
7.4.250.0000.00716.72
7.4.240.0000.00816.64
7.4.230.0030.00316.74
7.4.220.0120.00316.79
7.4.210.0060.00916.75
7.4.200.0000.00716.71
7.4.160.0050.01116.72
7.4.150.0180.00017.40
7.4.140.0110.01017.86
7.4.130.0040.01416.81
7.4.120.0090.00816.64
7.4.110.0090.01116.92
7.4.100.0070.01916.86
7.4.90.0090.01216.74
7.4.80.0080.01219.39
7.4.70.0110.00516.75
7.4.60.0090.00916.61
7.4.50.0080.00316.69
7.4.40.0040.01216.89
7.4.30.0100.00716.89
7.4.00.0030.01015.19
7.3.330.0050.00013.43
7.3.320.0000.00513.32
7.3.310.0070.00316.57
7.3.300.0040.00416.41
7.3.290.0030.01016.58
7.3.280.0090.00916.52
7.3.270.0090.00917.40
7.3.260.0100.00816.80
7.3.250.0130.00516.75
7.3.240.0060.01016.54
7.3.230.0060.00916.53
7.3.210.0030.01416.57
7.3.200.0120.00416.63
7.3.190.0070.01016.52
7.3.180.0150.00316.83
7.3.170.0100.01016.59
7.3.160.0030.01316.76
7.2.330.0120.00617.00
7.2.320.0100.01517.07
7.2.310.0140.00316.88
7.2.300.0100.00716.99
7.2.290.0090.00916.82
7.2.00.0030.01018.71
7.1.200.0140.00716.03
7.1.70.0100.00317.49
7.1.60.0030.01017.25
7.1.00.0070.07322.54
7.0.200.0050.00516.87
7.0.100.0230.07020.11
7.0.90.0130.06319.98
7.0.80.0170.05720.02
7.0.70.0130.06720.27
7.0.60.0200.07020.22
7.0.50.0130.05720.46
7.0.40.0030.06720.53
7.0.30.0170.06320.46
7.0.20.0200.07320.52
7.0.10.0130.07720.43
7.0.00.0130.06020.39
5.6.250.0330.05720.84
5.6.240.0070.06320.84
5.6.230.0200.05020.80
5.6.220.0130.05020.95
5.6.210.0230.05020.74
5.6.200.0130.05721.20
5.6.190.0170.05021.12
5.6.180.0130.07021.20
5.6.170.0170.06721.09
5.6.160.0330.05321.17
5.6.150.0100.08321.17
5.6.140.0230.05021.26
5.6.130.0130.06321.10
5.6.120.0130.05721.17
5.6.110.0130.06021.27
5.6.100.0100.05721.25
5.6.90.0130.06321.16
5.6.80.0030.08020.61
5.6.70.0200.06020.59
5.6.60.0100.05320.63
5.6.50.0130.05020.62
5.6.40.0130.06720.50
5.6.30.0100.07320.63
5.6.20.0230.06320.50
5.6.10.0200.06320.53
5.6.00.0130.06020.52

preferences:
64.67 ms | 401 KiB | 5 Q