3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<!DOCTYPE html> <html> <head></head> <body> <h1>Some Text</h1> <p>This is the first Paragraph</p> <ul> <li></li> <li></l1> </ul> <p>This is the second Pharagraph</p> </body> </html>'; $err = libxml_use_internal_errors(true); $dom = new DOMDocument(); $dom->loadHTML($html); libxml_clear_errors(); libxml_use_internal_errors($err); // find all p tags, select the first, get its value $pValue = $dom->getElementsByTagName('p')->item(0)->nodeValue; //This is the first Paragraph echo $pValue;

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.0120.01017.63
8.4.130.0120.01117.77
8.4.120.0070.00920.52
8.4.110.0090.00322.56
8.4.100.0120.00818.03
8.4.90.0060.01118.98
8.4.80.0080.00619.67
8.4.70.0100.00918.30
8.4.60.0080.01219.35
8.4.50.0060.00318.89
8.4.40.0090.00019.80
8.4.30.0130.00717.75
8.4.20.0200.00019.63
8.4.10.0000.00819.54
8.3.270.0120.00716.86
8.3.260.0130.00616.86
8.3.250.0060.00219.17
8.3.240.0110.00916.80
8.3.230.0050.00516.71
8.3.220.0070.01117.66
8.3.210.0050.00216.86
8.3.200.0050.01116.75
8.3.190.0100.00817.21
8.3.180.0040.00416.79
8.3.170.0120.00617.32
8.3.160.0000.01418.60
8.3.150.0130.00617.57
8.3.140.0060.00317.03
8.3.130.0080.00016.96
8.3.120.0050.00519.28
8.3.110.0030.00620.94
8.3.100.0160.00324.06
8.3.90.0070.00720.15
8.3.80.0090.00317.97
8.3.70.0160.00017.00
8.3.60.0100.01016.63
8.3.50.0080.00617.53
8.3.40.0000.01418.88
8.3.30.0110.00318.81
8.3.20.0050.00320.54
8.3.10.0040.00422.27
8.3.00.0040.00422.24
8.2.290.0100.00920.49
8.2.280.0100.00822.63
8.2.270.0090.00919.14
8.2.260.0000.00817.02
8.2.250.0060.00316.69
8.2.240.0130.00317.52
8.2.230.0090.01322.58
8.2.220.0060.00337.54
8.2.210.0150.00326.77
8.2.200.0070.00318.54
8.2.190.0040.01116.63
8.2.180.0090.00618.68
8.2.170.0110.00422.96
8.2.160.0040.01119.35
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00421.25
8.2.110.0100.00021.29
8.2.100.0040.00818.09
8.2.90.0040.00417.97
8.2.80.0000.00718.41
8.2.70.0030.00517.88
8.2.60.0000.00917.71
8.2.50.0000.00817.63
8.2.40.0040.00417.86
8.2.30.0000.00817.90
8.2.20.0040.00418.45
8.2.10.0000.00718.36
8.2.00.0040.00418.41
8.1.330.0120.00822.23
8.1.320.0110.00816.09
8.1.310.0000.00818.54
8.1.300.0040.01518.73
8.1.290.0060.00318.88
8.1.280.0090.00925.92
8.1.270.0030.00620.96
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0040.00719.36
8.1.230.0060.00621.10
8.1.220.0030.00517.91
8.1.210.0040.00420.63
8.1.200.0040.00417.35
8.1.190.0030.00617.35
8.1.180.0060.00318.10
8.1.170.0030.00617.62
8.1.160.0040.00418.98
8.1.150.0040.00420.81
8.1.140.0000.00921.13
8.1.130.0070.00019.07
8.1.120.0040.00417.63
8.1.110.0000.00817.64
8.1.100.0050.00317.52
8.1.90.0040.00417.64
8.1.80.0050.00317.59
8.1.70.0070.00017.61
8.1.60.0040.00417.72
8.1.50.0040.00417.57
8.1.40.0040.00417.72
8.1.30.0000.00717.73
8.1.20.0120.00017.76
8.1.10.0000.00817.82
8.1.00.0000.00817.73
8.0.300.0040.00420.21
8.0.290.0050.00316.88
8.0.280.0030.00318.13
8.0.270.0040.00418.30
8.0.260.0070.00016.95
8.0.250.0030.00317.19
8.0.240.0040.00417.15
8.0.230.0000.00717.03
8.0.220.0050.00317.05
8.0.210.0000.00717.04
8.0.200.0000.00717.01
8.0.190.0060.00317.09
8.0.180.0000.00717.00
8.0.170.0080.00016.93
8.0.160.0040.00416.97
8.0.150.0040.00417.07
8.0.140.0080.00016.94
8.0.130.0000.00513.57
8.0.120.0000.00716.92
8.0.110.0060.00316.74
8.0.100.0070.00017.13
8.0.90.0080.00017.14
8.0.80.0100.01217.16
8.0.70.0000.00717.09
8.0.60.0040.00417.10
8.0.50.0020.00516.81
8.0.30.0040.01617.16
8.0.20.0090.01017.41
8.0.10.0000.00817.25
8.0.00.0090.00916.88
7.4.330.0050.00015.55
7.4.320.0030.00316.71
7.4.300.0060.00016.71
7.4.290.0030.00316.63
7.4.280.0040.00416.81
7.4.270.0000.00716.76
7.4.260.0000.00716.76
7.4.250.0030.00716.87
7.4.240.0000.00716.78
7.4.230.0070.00016.81
7.4.220.0100.01016.76
7.4.210.0080.00616.90
7.4.200.0030.00316.55
7.4.160.0130.00616.71
7.4.150.0090.00917.40
7.4.140.0130.00917.86
7.4.130.0060.00916.74
7.4.120.0120.00716.69
7.4.110.0100.00716.82
7.4.100.0100.00716.60
7.4.90.0160.01016.66
7.4.80.0130.00719.39
7.4.70.0120.00916.61
7.4.60.0030.01316.62
7.4.50.0100.00316.89
7.4.40.0060.00916.80
7.4.30.0140.00316.71
7.4.10.0100.01016.58
7.4.00.0070.00815.81
7.3.330.0000.00613.22
7.3.320.0050.00013.28
7.3.310.0030.00316.53
7.3.300.0040.00416.44
7.3.290.0060.00916.35
7.3.280.0090.01116.40
7.3.270.0090.00917.40
7.3.260.0100.00716.50
7.3.250.0110.00816.60
7.3.240.0150.00316.55
7.3.230.0100.01016.73
7.3.210.0120.00616.51
7.3.200.0140.00316.57
7.3.190.0090.00616.49
7.3.180.0080.00816.43
7.3.170.0150.00616.60
7.3.160.0040.01216.64
7.3.130.0100.01016.47
7.3.120.0040.01116.50
7.3.110.0100.01016.36
7.3.100.0030.01416.60
7.3.90.0100.00716.38
7.3.80.0070.00716.32
7.3.70.0060.00916.48
7.3.60.0070.01116.55
7.3.50.0080.00816.27
7.3.40.0070.00716.34
7.3.30.0050.00516.63
7.3.20.0000.01318.31
7.3.10.0030.01318.22
7.3.00.0040.00718.10
7.2.330.0120.00616.84
7.2.320.0070.01416.90
7.2.310.0130.00716.68
7.2.300.0100.01116.67
7.2.290.0130.00516.85
7.2.260.0070.01016.96
7.2.250.0070.01416.54
7.2.240.0030.01316.79
7.2.230.0100.00716.42
7.2.220.0070.00716.43
7.2.210.0060.01016.70
7.2.200.0000.01216.77
7.2.190.0090.00616.71
7.2.180.0000.01116.40
7.2.170.0030.00916.86
7.2.160.0060.00316.61
7.2.150.0000.01218.57
7.2.140.0060.00918.45
7.2.130.0120.00018.48
7.2.120.0130.00718.46
7.2.110.0070.01018.32
7.2.100.0130.00318.56
7.2.90.0030.01618.40
7.2.80.0030.01018.25
7.2.70.0100.00718.30
7.2.60.0050.00817.78
7.2.50.0080.00418.46
7.2.40.0060.00918.61
7.2.30.0090.00618.58
7.2.20.0030.01118.39
7.2.10.0110.00018.50
7.2.00.0140.00918.11
7.1.330.0030.01117.64
7.1.320.0070.00417.46
7.1.310.0070.00717.58
7.1.300.0000.01117.73
7.1.290.0040.00717.55
7.1.280.0090.00317.61
7.1.270.0030.00917.65
7.1.260.0100.00317.52
7.1.250.0070.00417.63
7.1.240.0040.01517.43
7.1.230.0120.00917.44
7.1.220.0120.00617.36
7.1.210.0000.01117.34
7.1.200.0050.00816.47
7.1.190.0080.00317.32
7.1.180.0070.00717.64
7.1.170.0040.01117.61
7.1.160.0120.00317.67
7.1.150.0030.00917.71
7.1.140.0030.01017.51
7.1.130.0070.00717.50
7.1.120.0110.01117.22
7.1.110.0230.00817.00
7.1.100.0400.00816.72
7.1.90.0170.00816.93
7.1.80.0250.00916.76
7.1.70.0120.01016.38
7.1.60.0320.00725.41
7.1.50.0250.00825.31
7.1.40.0220.00924.99
7.1.30.0300.00325.25
7.1.20.0250.00825.16
7.1.10.0200.01016.14
7.1.00.0140.00816.24
7.0.330.0100.00017.29
7.0.320.0040.01117.21
7.0.310.0060.00617.22
7.0.300.0000.01317.30
7.0.290.0030.01217.32
7.0.280.0030.00717.09
7.0.270.0100.00317.19
7.0.260.0050.01416.94
7.0.250.0150.01116.46
7.0.240.0100.01316.43
7.0.230.0130.00816.53
7.0.220.0200.00716.77
7.0.210.0160.00815.97
7.0.200.0150.00616.16
7.0.190.0170.00715.98
7.0.180.0100.00915.78
7.0.170.0240.00815.88
7.0.160.0280.00715.83
7.0.150.0180.01015.81
7.0.140.0160.00315.81
7.0.130.0150.01115.98
7.0.120.0150.01115.98
7.0.110.0300.00515.74
7.0.100.0110.01215.78
7.0.90.0420.01215.95
7.0.80.0270.00715.96
7.0.70.0020.01415.88
7.0.60.0110.00815.62
7.0.50.0220.01115.77
7.0.40.0180.00514.93
7.0.30.0150.01114.95
7.0.20.0150.00914.86
7.0.10.0160.00615.01
7.0.00.0230.00714.90
5.6.400.0030.01315.76
5.6.390.0070.01116.07
5.6.380.0050.01116.08
5.6.370.0090.00916.18
5.6.360.0100.00615.99
5.6.350.0000.01316.11
5.6.340.0100.00015.91
5.6.330.0060.00615.96
5.6.320.0070.00716.22
5.6.310.0070.00716.35
5.6.300.0060.00316.15
5.6.290.0030.00916.20
5.6.280.0040.01216.07
5.6.270.0070.00715.91
5.6.260.0030.00616.13
5.6.250.0070.00716.21
5.6.240.0040.01115.78
5.6.230.0060.01116.10
5.6.220.0100.00616.16
5.6.210.0040.00715.96
5.6.200.0060.00715.92
5.6.190.0070.00716.16
5.6.180.0030.01316.15
5.6.170.0090.00616.14
5.6.160.0040.01016.17
5.6.150.0030.00716.03
5.6.140.0040.01115.99
5.6.130.0060.01016.10
5.6.120.0100.00316.16
5.6.110.0000.01515.92
5.6.100.0090.00615.82
5.6.90.0090.00315.84
5.6.80.0030.01016.05
5.6.70.0040.00716.04
5.6.60.0070.00715.96
5.6.50.0040.00815.86
5.6.40.0000.01016.18
5.6.30.0100.00316.04
5.6.20.0100.00615.86
5.6.10.0000.00915.79
5.6.00.0030.01316.10

preferences:
31.24 ms | 403 KiB | 5 Q