3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<span class=" xx email_p_14 xx "> labore@et.de </span>'; $dom = new DomDocument(); $dom->loadHTML($str, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $doc = new DOMXPath($dom); $items = $doc->query("//span[contains(@class, 'email_')]"); foreach ($items as $item) { $class = array_filter(explode(' ', $item->getAttribute('class')), function($x) { return substr( $x, 0, 6 ) === "email_"; }); print_r($class); echo $item->nodeValue; }

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.5.10.0100.00816.78
8.5.00.0140.00722.19
8.4.160.0110.01124.11
8.4.150.0010.00114.05
8.4.140.0140.00917.76
8.4.130.0130.00818.26
8.4.120.0100.01022.87
8.4.110.0130.00719.12
8.4.100.0140.00718.09
8.4.90.0170.00218.37
8.4.80.0120.00918.32
8.4.70.0120.00517.95
8.4.60.0060.00319.15
8.4.50.0130.00719.83
8.4.40.0140.00319.88
8.4.30.0080.00818.91
8.4.20.0070.01420.94
8.4.10.0090.00018.85
8.3.280.0170.00818.95
8.3.270.0110.00916.91
8.3.260.0120.00916.83
8.3.250.0150.00418.96
8.3.240.0150.00517.00
8.3.230.0130.00716.84
8.3.220.0090.00917.49
8.3.210.0100.01217.00
8.3.200.0070.00217.22
8.3.190.0120.00719.23
8.3.180.0040.00519.05
8.3.170.0150.00420.95
8.3.160.0030.01218.90
8.3.150.0070.01120.98
8.3.140.0040.00416.63
8.3.130.0060.01016.98
8.3.120.0100.00721.11
8.3.110.0000.00817.10
8.3.100.0120.00416.87
8.3.90.0030.00626.77
8.3.80.0060.00317.00
8.3.70.0070.00717.13
8.3.60.0090.00617.00
8.3.50.0000.01518.33
8.3.40.0160.00319.10
8.3.30.0040.01118.61
8.3.20.0080.00024.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.290.0070.00320.86
8.2.280.0090.00920.79
8.2.270.0110.00717.60
8.2.260.0070.01119.24
8.2.250.0060.00318.82
8.2.240.0060.00319.38
8.2.230.0030.00620.94
8.2.220.0090.00024.06
8.2.210.0110.00426.77
8.2.200.0060.00318.54
8.2.190.0080.00816.88
8.2.180.0110.01125.92
8.2.170.0060.00919.26
8.2.160.0000.01422.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00820.83
8.2.110.0090.00022.55
8.2.100.0000.01117.87
8.2.90.0050.00318.16
8.2.80.0000.00817.97
8.2.70.0030.00517.88
8.2.60.0040.00417.75
8.2.50.0040.00417.75
8.2.40.0040.00417.75
8.2.30.0080.00417.96
8.2.20.0060.00318.30
8.2.10.0000.00819.57
8.2.00.0000.00819.66
8.1.330.0120.00622.25
8.1.320.0100.00916.62
8.1.310.0040.01420.50
8.1.300.0000.00918.84
8.1.290.0090.00030.84
8.1.280.0030.01325.92
8.1.270.0090.00022.64
8.1.260.0070.00326.35
8.1.250.0070.00028.09
8.1.240.0120.00924.07
8.1.230.0120.00024.15
8.1.220.0090.00017.91
8.1.210.0080.00019.26
8.1.200.0060.00317.73
8.1.190.0000.00817.73
8.1.180.0040.00418.10
8.1.170.0050.00317.85
8.1.160.0000.00820.64
8.1.150.0040.00418.99
8.1.140.0000.00719.30
8.1.130.0040.00417.67
8.1.120.0040.00417.88
8.1.110.0050.00317.87
8.1.100.0030.00517.77
8.1.90.0050.00317.77
8.1.80.0080.00417.78
8.1.70.0040.00417.84
8.1.60.0000.00817.91
8.1.50.0090.00017.77
8.1.40.0040.00417.86
8.1.30.0040.00417.93
8.1.20.0040.00417.99
8.1.10.0030.00517.82
8.1.00.0000.00717.86
8.0.300.0050.00320.39
8.0.290.0050.00217.13
8.0.280.0080.00018.39
8.0.270.0070.00017.16
8.0.260.0000.00717.11
8.0.250.0000.00717.20
8.0.240.0080.00017.24
8.0.230.0070.00017.28
8.0.220.0020.00517.19
8.0.210.0040.00417.16
8.0.200.0070.00017.23
8.0.190.0040.00417.33
8.0.180.0000.00717.23
8.0.170.0030.00617.17
8.0.160.0070.00017.18
8.0.150.0040.00417.25
8.0.140.0000.00717.15
8.0.130.0030.00313.79
8.0.120.0030.00617.23
8.0.110.0040.00417.09
8.0.100.0000.00817.20
8.0.90.0050.00317.28
8.0.80.0040.00417.32
8.0.70.0040.00417.15
8.0.60.0070.00017.24
8.0.50.0000.00717.32
8.0.30.0050.00317.17
8.0.20.0000.00717.26
8.0.10.0050.00317.40
8.0.00.0040.00417.37
7.4.330.0060.00015.55
7.4.320.0040.00416.84
7.4.300.0030.00316.85
7.4.290.0000.00716.84
7.4.280.0030.00516.75
7.4.270.0000.00716.80
7.4.260.0060.00013.62
7.4.250.0040.00416.69
7.4.240.0050.00316.76
7.4.230.0090.00016.88
7.4.220.0040.00416.95
7.4.210.0030.00516.99
7.4.200.0070.00016.96
7.4.190.0000.00716.82
7.4.180.0030.00516.74
7.4.160.0040.00417.03
7.4.150.0070.00016.64
7.4.140.0040.00416.94
7.4.130.0030.00316.78
7.4.120.0080.00016.85
7.4.110.0030.00316.63
7.4.100.0000.00716.89
7.4.90.0070.00016.94
7.4.80.0040.00416.68
7.4.70.0000.00816.93
7.4.60.0040.00416.99
7.4.50.0000.00716.61
7.4.40.0000.00816.52
7.4.30.0000.00716.70
7.4.20.0040.00416.59
7.4.10.0030.00316.68
7.4.00.0060.00316.96
7.3.330.0070.00016.71
7.3.320.0050.00313.63
7.3.310.0030.00316.73
7.3.300.0030.00316.73
7.3.290.0060.00016.63
7.3.280.0040.00416.52
7.3.270.0050.00316.68
7.3.260.0000.00716.63
7.3.250.0070.00016.57
7.3.240.0000.00816.63
7.3.230.0060.00316.52
7.3.220.0040.00416.60
7.3.210.0030.00516.57
7.3.200.0090.00016.57
7.3.190.0030.00616.57
7.3.180.0000.00816.57
7.3.170.0000.00816.46
7.3.160.0070.00016.59
7.3.150.0030.00616.61
7.3.140.0030.00616.49
7.3.130.0040.00416.59
7.3.120.0040.00416.56
7.3.110.0000.00916.43
7.3.100.0000.01016.43
7.3.90.0040.00416.75
7.3.80.0060.00016.59
7.3.70.0000.00816.76
7.3.60.0000.00816.64
7.3.50.0090.00016.64
7.3.40.0040.00416.61
7.3.30.0000.00816.58
7.3.20.0040.00418.42
7.3.10.0050.00318.30
7.3.00.0030.00618.37

preferences:
41.67 ms | 403 KiB | 5 Q