3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<h1>Foo</h1><h2>Bar</h2><p>lorem ipsum</p>'; $dom = new \DomDocument(); $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED); $nodes = $dom->getElementsByTagName('*'); echo $nodes->item(0)->tagName . ' -> ' . $nodes->item(0)->nodeValue . "\n"; foreach ($nodes as $node) { echo $node->tagName . ' -> ' . $node->nodeValue . "\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.1.130.0030.00717.98
8.1.120.0000.00717.73
8.1.110.0000.00817.67
8.1.100.0030.00517.61
8.1.90.0000.00717.63
8.1.80.0040.00417.69
8.1.70.0040.00417.67
8.1.60.0030.00617.89
8.1.50.0000.00817.73
8.1.40.0030.00617.66
8.1.30.0000.00917.73
8.1.20.0050.00317.79
8.1.10.0030.00517.75
8.1.00.0050.00317.78
8.0.260.0030.00318.58
8.0.250.0030.00317.27
8.0.240.0030.00517.16
8.0.230.0030.00317.14
8.0.220.0000.00717.12
8.0.210.0040.00417.18
8.0.200.0060.00017.25
8.0.190.0040.00417.15
8.0.180.0050.00217.16
8.0.170.0000.00717.06
8.0.160.0000.00717.02
8.0.150.0000.00717.04
8.0.140.0030.00417.06
8.0.130.0070.00013.57
8.0.120.0000.00717.10
8.0.110.0070.00017.10
8.0.100.0040.00416.97
8.0.90.0040.00417.16
8.0.80.0060.01017.12
8.0.70.0040.00417.04
8.0.60.0000.00717.10
8.0.50.0000.00817.21
8.0.30.0100.00917.26
8.0.20.0120.01017.44
8.0.10.0030.00517.31
8.0.00.0140.00517.10
7.4.330.0030.00315.20
7.4.320.0030.00316.83
7.4.300.0030.00316.70
7.4.290.0000.00816.85
7.4.280.0040.00716.78
7.4.270.0030.00316.71
7.4.260.0120.00016.64
7.4.250.0070.00016.89
7.4.240.0050.00216.73
7.4.230.0030.00316.80
7.4.220.0170.00716.79
7.4.210.0070.00816.87
7.4.200.0000.00716.83
7.4.160.0040.01216.87
7.4.150.0150.00617.40
7.4.140.0150.00517.86
7.4.130.0110.01016.69
7.4.120.0120.00516.74
7.4.110.0030.01416.67
7.4.100.0000.01716.55
7.4.90.0090.00816.48
7.4.80.0100.01019.39
7.4.70.0000.02116.71
7.4.60.0000.01616.81
7.4.50.0080.00916.51
7.4.40.0060.01016.72
7.4.30.0060.01016.61
7.4.20.0070.01016.37
7.4.10.0130.00316.46
7.4.00.0080.00615.75
7.3.330.0060.00013.35
7.3.320.0060.00613.24
7.3.310.0040.00416.34
7.3.300.0030.00316.62
7.3.290.0000.00816.36
7.3.280.0100.00616.50
7.3.270.0060.01317.40
7.3.260.0120.00916.66
7.3.250.0080.01516.75
7.3.240.0070.01016.71
7.3.230.0130.01016.39
7.3.210.0120.00616.86
7.3.200.0160.00719.39
7.3.190.0130.00416.69
7.3.180.0140.00316.55
7.3.170.0160.00016.59
7.3.160.0000.01616.43
7.3.150.0060.01016.52
7.3.140.0140.00316.52
7.3.130.0120.00416.36
7.3.120.0070.01016.56
7.3.110.0080.00816.48
7.3.100.0030.01316.68
7.3.90.0060.01016.50
7.3.80.0100.00716.43
7.3.70.0140.00716.52
7.3.60.0070.01016.55
7.3.50.0030.01316.44
7.3.40.0090.00616.60
7.3.30.0070.01016.60
7.3.20.0100.00716.50
7.3.10.0070.00816.62
7.3.00.0080.01016.56
7.2.330.0120.01017.04
7.2.320.0030.01317.07
7.2.310.0060.01416.75
7.2.300.0100.00716.97
7.2.290.0120.00416.91
7.2.280.0160.00016.99
7.2.270.0100.00616.98
7.2.260.0100.00716.80
7.2.250.0090.00916.83
7.2.240.0060.01216.86
7.2.230.0130.00316.67
7.2.220.0030.01416.88
7.2.210.0100.00616.90
7.2.200.0100.01317.02
7.2.190.0100.01016.75
7.2.180.0130.00316.80
7.2.170.0030.01416.72
7.2.160.0100.01016.81
7.2.150.0150.00416.97
7.2.140.0090.00916.84
7.2.130.0070.00916.86
7.2.120.0110.00616.95
7.2.110.0090.00617.04
7.2.100.0150.00816.93
7.2.90.0120.00516.91
7.2.80.0080.00816.82
7.2.70.0120.00716.91
7.2.60.0080.00717.09
7.2.50.0080.00816.88
7.2.40.0090.00717.01
7.2.30.0080.00717.01
7.2.20.0110.00517.06
7.2.10.0070.00916.92
7.2.00.0090.00717.79
7.1.330.0090.00915.70
7.1.320.0140.00815.73
7.1.310.0090.01215.74
7.1.300.0150.00515.82
7.1.290.0160.00315.75
7.1.280.0090.01215.95
7.1.270.0090.00915.67
7.1.260.0110.00815.86
7.1.250.0030.01315.90
7.1.240.0060.00915.74
7.1.230.0070.01115.71
7.1.220.0180.00015.62
7.1.210.0090.00915.68
7.1.200.0090.00615.84
7.1.190.0150.00615.55
7.1.180.0060.01015.61
7.1.170.0150.00315.67
7.1.160.0130.00415.63
7.1.150.0120.00615.72
7.1.140.0250.00615.74
7.1.130.0100.00715.69
7.1.120.0140.00515.75
7.1.110.0080.00815.63
7.1.100.0090.00616.91
7.1.90.0040.02115.81
7.1.80.0130.00615.91
7.1.70.0070.00716.57
7.1.60.0150.00717.60
7.1.50.0040.01516.39
7.1.40.0140.00615.85
7.1.30.0070.01115.79
7.1.20.0150.00315.79
7.1.10.0090.00615.49
7.1.00.0070.04519.04
7.0.330.0080.00815.25
7.0.320.0060.01015.52
7.0.310.0150.00315.35
7.0.300.0060.00915.39
7.0.290.0130.00615.35
7.0.280.0110.00815.40
7.0.270.0110.01415.37
7.0.260.0030.01315.55
7.0.250.0060.00915.47
7.0.240.0150.00415.52
7.0.230.0130.00415.48
7.0.220.0120.00615.16
7.0.210.0100.00615.39
7.0.200.0080.00616.07
7.0.190.0140.00315.39
7.0.180.0190.00915.46
7.0.170.0090.00915.41
7.0.160.0100.00715.50
7.0.150.0090.00915.46
7.0.140.0100.02318.65
7.0.130.0070.01115.33
7.0.120.0100.00715.48
7.0.110.0160.00315.46
7.0.100.0070.01015.46
7.0.90.0090.00915.46
7.0.80.0080.00815.35
7.0.70.0050.05018.59
7.0.60.0140.04318.62
7.0.50.0070.05118.72
7.0.40.0140.03617.66
7.0.30.0130.03617.74
7.0.20.0170.04117.71
7.0.10.0120.04017.64
7.0.00.0140.02617.80
5.6.400.0160.00315.96
5.6.390.0100.01016.00
5.6.380.0140.00916.07
5.6.370.0070.01716.37
5.6.360.0090.01116.03
5.6.350.0140.00315.77
5.6.340.0140.00716.05
5.6.330.0170.01115.91
5.6.320.0160.00316.04
5.6.310.0150.00315.88
5.6.300.0150.00415.96
5.6.290.0190.00316.00
5.6.280.0080.04018.48
5.6.270.0100.01116.20
5.6.260.0050.01415.87
5.6.250.0110.00716.04
5.6.240.0070.01516.12
5.6.230.0080.01216.25
5.6.220.0130.04118.36
5.6.210.0030.05318.37
5.6.200.0090.04918.55
5.6.190.0040.04918.51
5.6.180.0130.02518.37
5.6.170.0060.03418.52
5.6.160.0090.05118.64
5.6.150.0080.02718.50
5.6.140.0120.04518.37
5.6.130.0160.03918.50
5.6.120.0110.05018.48
5.6.110.0040.05618.53
5.6.100.0070.03618.46
5.6.90.0040.04618.45
5.6.80.0120.02118.17
5.6.70.0140.03818.20
5.6.60.0090.03418.04
5.6.50.0060.04017.99
5.6.40.0130.04418.03
5.6.30.0120.03818.16
5.6.20.0080.04618.16
5.6.10.0070.04618.20
5.6.00.0110.03618.11
5.5.380.0130.01015.97
5.5.370.0140.00815.98
5.5.360.0100.03018.16
5.5.350.0260.04018.22
5.5.340.0030.05318.21
5.5.330.0110.03518.43
5.5.320.0130.04618.38
5.5.310.0110.04118.36
5.5.300.0100.04618.28
5.5.290.0140.04318.55
5.5.280.0100.04218.45
5.5.270.0100.03518.27
5.5.260.0070.05318.51
5.5.250.0130.04418.17
5.5.240.0100.04318.02
5.5.230.0060.03318.05
5.5.220.0090.03118.05
5.5.210.0190.03518.06
5.5.200.0130.04218.07
5.5.190.0070.03118.04
5.5.180.0070.02918.01
5.5.170.0170.00615.82
5.5.160.0110.02718.01
5.5.150.0110.04318.12
5.5.140.0090.04118.01
5.5.130.0100.04117.99
5.5.120.0150.04217.96
5.5.110.0100.04018.10
5.5.100.0130.04218.04
5.5.90.0110.04418.05
5.5.80.0020.05317.85
5.5.70.0110.03417.96
5.5.60.0070.04917.94
5.5.50.0120.04017.95
5.5.40.0070.05017.81
5.5.30.0120.04217.91
5.5.20.0130.03817.87
5.5.10.0120.03317.89
5.5.00.0110.04617.90
5.4.450.0100.04316.24
5.4.440.0140.04416.17
5.4.430.0080.02916.10
5.4.420.0130.04316.14
5.4.410.0070.04916.05
5.4.400.0090.03115.99
5.4.390.0140.03715.94
5.4.380.0140.04315.93
5.4.370.0100.04315.97
5.4.360.0120.03915.92
5.4.350.0100.04315.98
5.4.340.0130.02016.07
5.4.330.0150.00612.84
5.4.320.0100.04415.83
5.4.310.0120.04315.96
5.4.300.0120.04215.75
5.4.290.0120.02515.89
5.4.280.0070.04415.86
5.4.270.0120.03315.95
5.4.260.0160.03715.98
5.4.250.0110.02915.93
5.4.240.0140.03315.89
5.4.230.0130.03715.92
5.4.220.0120.04715.99
5.4.210.0110.04015.82
5.4.200.0210.03315.90
5.4.190.0110.04515.87
5.4.180.0090.04216.06
5.4.170.0090.04416.00
5.4.160.0130.04215.68
5.4.150.0110.04015.98
5.4.140.0150.01814.48
5.4.130.0080.02514.56
5.4.120.0140.03814.69
5.4.110.0180.02514.60
5.4.100.0120.03814.54
5.4.90.0140.03814.53
5.4.80.0100.03914.62
5.4.70.0060.04214.59
5.4.60.0140.03714.54
5.4.50.0160.03614.71
5.4.40.0070.02814.63
5.4.30.0120.02014.52
5.4.20.0130.02014.62
5.4.10.0100.03114.72
5.4.00.0080.04214.27
5.3.290.0080.04313.87
5.3.280.0090.03313.71
5.3.270.0160.03013.83
5.3.260.0100.04013.88
5.3.250.0140.03213.82
5.3.240.0070.04913.74
5.3.230.0080.04413.74
5.3.220.0060.03713.76
5.3.210.0120.04513.66
5.3.200.0060.03113.69
5.3.190.0090.04213.70
5.3.180.0120.03613.81
5.3.170.0170.03013.76
5.3.160.0160.03913.96
5.3.150.0150.04013.79
5.3.140.0150.04113.74
5.3.130.0080.04413.73
5.3.120.0230.03513.79
5.3.110.0090.04013.80
5.3.100.0130.04113.59
5.3.90.0140.03913.52
5.3.80.0080.04313.46
5.3.70.0160.03013.45
5.3.60.0120.02813.52
5.3.50.0070.04013.42
5.3.40.0080.04113.51
5.3.30.0060.03313.38
5.3.20.0100.03913.14
5.3.10.0110.04113.19
5.3.00.0110.03613.15
5.2.170.0120.03012.11
5.2.160.0110.03412.10
5.2.150.0110.03512.11
5.2.140.0060.02412.07
5.2.130.0120.03112.11
5.2.120.0090.02612.14
5.2.110.0090.03512.13
5.2.100.0050.02512.15
5.2.90.0050.03812.11
5.2.80.0070.03812.08
5.2.70.0130.03512.07
5.2.60.0120.02312.03
5.2.50.0080.03812.12
5.2.40.0100.03512.24
5.2.30.0090.03412.06
5.2.20.0130.03211.97
5.2.10.0090.03511.99
5.2.00.0130.03011.96
5.1.60.0040.03111.59
5.1.50.0080.03011.61
5.1.40.0130.02711.58
5.1.30.0090.03111.70
5.1.20.0050.03311.66
5.1.10.0070.02811.67
5.1.00.0060.03111.59
5.0.50.0050.01811.32
5.0.40.0070.02411.32
5.0.30.0030.03811.32
5.0.20.0020.02011.32
5.0.10.0030.02911.32
5.0.00.0050.03011.32
4.4.90.0060.01711.32
4.4.80.0040.01911.32
4.4.70.0050.01811.32
4.4.60.0070.01811.32
4.4.50.0060.01811.32
4.4.40.0060.02611.32
4.4.30.0020.01911.32
4.4.20.0060.01811.32
4.4.10.0020.01911.32
4.4.00.0020.02811.32
4.3.110.0020.01611.32
4.3.100.0020.01711.32
4.3.90.0030.01811.32
4.3.80.0080.02511.32
4.3.70.0030.01811.32
4.3.60.0000.02111.32
4.3.50.0040.01711.32
4.3.40.0030.02611.32
4.3.30.0040.01311.32
4.3.20.0020.01911.32
4.3.10.0050.01311.32
4.3.00.0030.01811.32

preferences:
13.48 ms | 406 KiB | 5 Q