3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="feed-item-description"> <ul> <li><strong>Impact:</strong>&nbsp;Low</li> <li><strong>Severity:</strong> <span class="label label-info">Low</span></li> </ul> </div>'; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXPath($doc); $feed_items = $xpath->query('//div[contains(@class, "feed-item-description")]'); foreach ($feed_items as $fi) { $impact_node = $xpath->query('//li[contains(string(), "Impact:")]', $fi); $impact = preg_replace('/Impact:\W*/', '', $impact_node->item(0)->textContent); echo $impact . "\n"; $severity_node = $xpath->query('//li[contains(string(), "Severity:")]', $fi); $severity = preg_replace('/Severity:\W*/u', '', $severity_node->item(0)->textContent); echo $severity . "\n"; }

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.0080.01417.99
8.4.130.0060.00418.48
8.4.120.0120.00821.00
8.4.110.0080.00922.93
8.4.100.0150.00718.42
8.4.90.0100.00921.02
8.4.80.0120.00919.28
8.4.70.0070.01020.76
8.4.60.0080.00320.98
8.4.50.0040.00418.34
8.4.40.0030.01720.84
8.4.30.0100.01020.65
8.4.20.0100.01020.02
8.4.10.0060.00920.00
8.3.270.0130.00617.20
8.3.260.0120.00717.20
8.3.250.0060.00319.49
8.3.240.0110.00917.09
8.3.230.0040.00417.31
8.3.220.0050.00319.24
8.3.210.0120.00717.27
8.3.200.0040.00517.22
8.3.190.0110.00817.55
8.3.180.0160.00417.26
8.3.170.0180.00019.04
8.3.160.0130.00620.50
8.3.150.0160.00317.19
8.3.140.0060.00317.62
8.3.130.0090.00018.69
8.3.120.0090.00020.93
8.3.110.0140.00720.94
8.3.100.0080.00424.06
8.3.90.0060.00926.77
8.3.80.0030.00617.25
8.3.70.0130.00617.25
8.3.60.0070.01519.05
8.3.50.0080.00823.85
8.3.40.0140.01019.52
8.3.30.0140.00419.11
8.3.20.0040.00422.14
8.3.10.0090.00020.45
8.3.00.0070.00020.79
8.2.290.0120.00717.68
8.2.280.0050.00419.20
8.2.270.0100.01019.61
8.2.260.0070.01118.77
8.2.250.0080.00018.90
8.2.240.0060.01319.34
8.2.230.0000.00922.58
8.2.220.0110.00037.54
8.2.210.0050.00326.77
8.2.200.0100.00018.93
8.2.190.0140.00717.00
8.2.180.0120.00325.92
8.2.170.0140.00419.47
8.2.160.0080.00622.96
8.2.150.0050.00524.18
8.2.140.0090.00624.66
8.2.130.0110.00826.16
8.2.120.0050.00321.47
8.2.110.0060.00322.57
8.2.100.0060.00618.41
8.2.90.0050.00319.69
8.2.80.0040.00419.32
8.2.70.0040.00418.00
8.2.60.0030.00618.18
8.2.50.0030.00518.07
8.2.40.0000.00819.64
8.2.30.0040.00418.29
8.2.20.0090.00518.47
8.2.10.0000.00819.83
8.2.00.0040.00419.70
8.1.330.0110.00922.42
8.1.320.0080.01018.44
8.1.310.0140.00318.60
8.1.300.0060.01318.42
8.1.290.0070.00330.84
8.1.280.0140.00425.92
8.1.270.0030.00521.14
8.1.260.0060.00326.35
8.1.250.0040.01128.09
8.1.240.0050.00520.62
8.1.230.0090.00318.15
8.1.220.0000.00818.29
8.1.210.0040.00418.77
8.1.200.0030.00617.85
8.1.190.0000.00817.73
8.1.180.0000.00818.10
8.1.170.0080.00019.32
8.1.160.0070.00319.34
8.1.150.0070.00019.31
8.1.140.0000.00722.41
8.1.130.0000.00720.50
8.1.120.0040.00417.84
8.1.110.0040.00417.84
8.1.100.0050.00517.82
8.1.90.0000.00717.94
8.1.80.0000.00717.90
8.1.70.0050.00217.88
8.1.60.0070.00318.06
8.1.50.0000.00817.89
8.1.40.0040.00417.95
8.1.30.0030.00618.05
8.1.20.0040.00418.01
8.1.10.0030.00518.08
8.1.00.0000.01218.04
8.0.300.0080.00018.77
8.0.290.0080.00017.25
8.0.280.0000.00818.83
8.0.270.0040.00418.59
8.0.260.0030.00320.45
8.0.250.0050.00217.43
8.0.240.0030.00317.53
8.0.230.0040.00417.45
8.0.220.0070.00017.38
8.0.210.0040.00417.48
8.0.200.0030.00317.52
8.0.190.0040.00417.45
8.0.180.0080.00417.50
8.0.170.0060.00317.50
8.0.160.0040.00417.46
8.0.150.0040.00417.39
8.0.140.0040.00417.43
8.0.130.0030.00313.88
8.0.120.0060.00517.52
8.0.110.0080.00017.51
8.0.100.0040.00417.48
8.0.90.0030.00617.52
8.0.80.0180.00417.57
8.0.70.0080.00017.31
8.0.60.0000.00817.45
8.0.50.0030.00517.49
8.0.30.0090.00917.54
8.0.20.0110.00817.69
8.0.10.0060.00317.59
8.0.00.0120.00617.12
7.4.330.0000.00515.55
7.4.320.0000.00817.14
7.4.300.0000.00617.20
7.4.290.0000.00717.12
7.4.280.0050.00217.07
7.4.270.0040.00417.20
7.4.260.0000.00613.87
7.4.250.0030.00516.98
7.4.240.0060.00117.19
7.4.230.0070.00017.16
7.4.220.0050.00217.17
7.4.210.0070.00717.21
7.4.200.0030.00317.18
7.4.130.0110.01417.18
7.4.120.0100.01016.94
7.4.110.0090.00917.07
7.4.100.0080.01217.18
7.4.90.0120.00616.91
7.4.80.0140.00319.39
7.4.70.0050.01116.98
7.4.60.0030.01417.10
7.4.50.0100.00716.91
7.4.40.0160.00616.98
7.4.00.0100.00415.29
7.3.330.0030.00316.87
7.3.320.0050.00013.69
7.3.310.0080.00016.64
7.3.300.0050.00316.80
7.3.290.0080.01116.86
7.3.280.0140.00516.84
7.3.260.0120.00616.99
7.3.240.0130.00516.91
7.3.230.0110.00716.89
7.3.210.0060.01016.73
7.3.200.0060.01217.02
7.3.190.0040.01216.86
7.3.180.0100.00716.86
7.3.170.0120.00616.85
7.3.160.0080.01216.87
7.3.120.0130.00015.39
7.3.110.0100.00314.99
7.3.100.0030.01014.82
7.3.90.0070.00715.15
7.3.80.0060.01315.13
7.3.70.0090.01115.23
7.3.60.0140.00015.25
7.3.50.0030.01115.09
7.3.40.0050.00815.02
7.3.30.0090.00515.00
7.3.20.0040.01115.14
7.3.10.0090.00615.18
7.3.00.0090.00615.34
7.2.330.0100.01017.12
7.2.320.0060.01617.21
7.2.310.0090.01217.29
7.2.300.0180.00017.18
7.2.290.0140.00417.29
7.2.250.0040.01115.30
7.2.240.0070.00715.37
7.2.230.0140.00515.50
7.2.220.0090.00615.58
7.2.210.0100.01115.26
7.2.200.0140.00515.19
7.2.190.0040.01215.32
7.2.180.0110.00615.20
7.2.170.0080.00815.39
7.1.330.0100.00314.48
7.1.320.0080.00814.38
7.1.310.0030.01514.16
7.1.300.0120.00314.04
7.1.290.0070.00714.14
7.1.280.0060.00814.20
7.1.270.0070.00714.18
7.1.260.0050.00814.18

preferences:
34.66 ms | 403 KiB | 5 Q