3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new \SimpleXMLElement(' <blog-post> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> </blog-post>' ); var_dump(count($xml->xpath('*'))); var_dump($xml->count()); var_dump(count($xml)); var_dump(count($xml->children())); echo "\n\n"; $xml = new \SimpleXMLElement(' <blog-post> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> </blog-post>' ); var_dump(count($xml->xpath('*'))); var_dump(count($xml)); var_dump(count($xml->children())); echo "\n\n"; $xml = new \SimpleXMLElement(' <dc:blog-post xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:tag/> <dc:tag/> <dc:tag/> </dc:blog-post>' ); var_dump(count($xml->xpath('*'))); var_dump(count($xml)); var_dump(count($xml->children()));

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.00820.03
8.5.00.0150.00520.21
8.4.150.0020.00014.05
8.4.140.0150.00817.73
8.4.130.0110.00918.05
8.4.120.0120.00821.04
8.4.110.0100.00922.84
8.4.100.0100.01018.07
8.4.90.0110.01022.91
8.4.80.0100.01020.10
8.4.70.0050.01218.55
8.4.60.0100.01019.24
8.4.50.0060.00518.99
8.4.40.0100.01018.29
8.4.30.0060.00318.20
8.4.20.0070.01319.11
8.4.10.0100.00719.70
8.3.280.0130.00718.70
8.3.270.0080.01317.05
8.3.260.0120.00817.05
8.3.250.0050.00419.34
8.3.240.0140.00616.86
8.3.230.0100.01017.09
8.3.220.0050.00219.48
8.3.210.0080.01118.75
8.3.200.0080.00116.91
8.3.190.0110.00819.38
8.3.180.0130.00616.91
8.3.170.0130.00617.40
8.3.160.0120.00620.20
8.3.150.0070.01119.18
8.3.140.0130.00617.39
8.3.130.0080.00018.93
8.3.120.0060.00319.62
8.3.110.0090.00017.10
8.3.100.0080.00817.12
8.3.90.0050.00316.74
8.3.80.0090.00018.77
8.3.70.0150.00318.68
8.3.60.0160.00618.68
8.3.50.0120.00822.26
8.3.40.0000.01519.04
8.3.30.0080.00818.95
8.3.20.0040.00419.29
8.3.10.0040.00422.19
8.3.00.0030.00519.51
8.2.290.0090.00920.98
8.2.280.0130.00618.82
8.2.270.0130.00619.18
8.2.260.0090.00616.90
8.2.250.0150.00317.04
8.2.240.0030.00617.44
8.2.230.0080.00820.94
8.2.220.0090.00024.06
8.2.210.0060.00926.77
8.2.200.0090.00018.79
8.2.190.0130.01018.85
8.2.180.0060.01216.88
8.2.170.0110.00422.96
8.2.160.0110.00321.40
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00420.75
8.2.120.0080.00026.35
8.2.110.0050.00522.71
8.2.100.0000.01118.16
8.2.90.0040.00418.22
8.2.80.0000.00819.59
8.2.70.0060.00317.88
8.2.60.0080.00018.26
8.2.50.0040.00418.10
8.2.40.0030.00620.84
8.2.30.0000.00821.50
8.2.20.0080.00018.36
8.2.10.0030.00518.43
8.2.00.0080.00018.04
8.1.330.0060.01222.33
8.1.320.0110.00916.63
8.1.310.0150.00318.83
8.1.300.0060.00318.34
8.1.290.0090.00018.88
8.1.280.0120.00925.92
8.1.270.0040.00422.58
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00624.25
8.1.230.0070.00423.02
8.1.220.0040.00418.03
8.1.210.0040.00419.34
8.1.200.0060.00317.60
8.1.190.0040.00417.59
8.1.180.0000.00818.10
8.1.170.0050.00319.21
8.1.160.0040.00419.19
8.1.150.0040.00420.61
8.1.140.0040.00419.90
8.1.130.0040.00219.38
8.1.120.0070.00017.73
8.1.110.0040.00417.85
8.1.100.0040.00417.73
8.1.90.0050.00217.74
8.1.80.0000.00817.95
8.1.70.0030.00317.92
8.1.60.0040.00418.04
8.1.50.0040.00417.75
8.1.40.0000.00817.79
8.1.30.0000.00818.11
8.1.20.0030.00618.12
8.1.10.0000.00718.03
8.1.00.0040.00418.00
8.0.300.0040.00420.59
8.0.290.0050.00217.13
8.0.280.0000.00718.87
8.0.270.0000.00817.58
8.0.260.0030.00317.61
8.0.250.0030.00317.32
8.0.240.0000.00717.30
8.0.230.0030.00317.13
8.0.220.0050.00217.30
8.0.210.0030.00317.26
8.0.200.0000.00617.20
8.0.190.0000.00717.34
8.0.180.0040.00417.15
8.0.170.0040.00417.36
8.0.160.0000.00817.13
8.0.150.0050.00217.23
8.0.140.0040.00417.17
8.0.130.0000.00513.63
8.0.120.0040.00417.11
8.0.110.0050.00317.23
8.0.100.0050.00317.36
8.0.90.0040.00417.30
8.0.80.0070.01417.25
8.0.70.0000.00817.24
8.0.60.0040.00417.27
8.0.50.0000.00817.23
8.0.30.0090.00917.50
8.0.20.0090.01117.50
8.0.10.0000.00717.50
8.0.00.0030.01417.14
7.4.330.0050.00215.55
7.4.320.0030.00316.90
7.4.300.0030.00316.96
7.4.290.0000.00716.99
7.4.280.0040.00416.96
7.4.270.0040.00416.91
7.4.260.0080.00416.70
7.4.250.0000.00716.98
7.4.240.0000.00716.84
7.4.230.0000.00717.12
7.4.220.0070.01117.01
7.4.210.0060.00916.97
7.4.200.0000.00816.84
7.4.160.0070.01116.91
7.4.150.0120.00617.40
7.4.140.0150.00917.86
7.4.130.0100.00716.98
7.4.120.0110.00816.86
7.4.110.0100.00716.79
7.4.100.0030.01416.95
7.4.90.0100.00716.98
7.4.80.0140.00919.39
7.4.70.0030.01316.85
7.4.60.0130.00317.10
7.4.50.0110.00716.75
7.4.40.0090.00616.93
7.4.30.0090.00916.84
7.4.00.0070.01015.14
7.3.330.0000.00513.62
7.3.320.0000.00513.58
7.3.310.0030.00316.46
7.3.300.0030.00316.66
7.3.290.0080.00916.69
7.3.280.0100.00816.67
7.3.270.0090.00917.40
7.3.260.0100.01116.79
7.3.250.0080.01016.55
7.3.240.0160.00316.73
7.3.230.0130.00316.80
7.3.210.0130.00416.93
7.3.200.0110.00616.76
7.3.190.0150.00316.60
7.3.180.0090.00916.68
7.3.170.0160.00616.78
7.3.160.0050.01316.55
7.2.330.0030.01417.13
7.2.320.0090.01616.88
7.2.310.0050.01116.98
7.2.300.0070.01816.82
7.2.290.0090.00917.20
7.2.120.0130.00716.80
7.2.110.0040.01116.94
7.2.100.0070.00716.84
7.2.90.0110.00716.96
7.2.80.0080.00316.73
7.2.70.0160.00816.99
7.2.60.0150.00416.98
7.2.50.0070.01117.01
7.2.40.0150.00617.02
7.2.30.0170.00317.08
7.2.20.0000.01516.88
7.2.10.0100.00717.06
7.2.00.0080.01017.85
7.1.240.0140.00615.80
7.1.230.0110.00915.71
7.1.220.0190.00015.71
7.1.210.0130.00415.59
7.1.200.0080.00815.94
7.1.190.0110.00215.72
7.1.180.0100.00515.74
7.1.170.0130.00615.73
7.1.160.0170.00315.84
7.1.150.0170.00015.92
7.1.140.0070.01115.87
7.1.130.0120.00615.88
7.1.120.0160.00315.83
7.1.110.0110.00515.89
7.1.100.0070.00716.89
7.1.90.0150.00315.64
7.1.80.0110.00515.80
7.1.70.0080.00316.46
7.1.60.0080.00816.55
7.1.50.0090.01216.54
7.1.40.0040.00815.84
7.1.30.0110.00415.94
7.1.20.0050.00915.85
7.1.10.0090.00916.03
7.1.00.0070.03519.33
7.0.320.0120.00515.80
7.0.310.0140.00615.57
7.0.300.0170.00015.61
7.0.290.0140.00215.72
7.0.280.0090.01315.60
7.0.270.0120.00615.47
7.0.260.0170.00015.38
7.0.250.0110.01115.60
7.0.240.0170.00015.56
7.0.230.0110.00515.61
7.0.220.0100.00715.68
7.0.210.0110.00415.76
7.0.200.0110.00616.08
7.0.190.0100.01015.54
7.0.180.0130.00315.73
7.0.170.0090.00415.64
7.0.160.0120.00315.70
7.0.150.0140.00315.48
7.0.140.0120.02818.75
7.0.130.0130.03318.86
7.0.120.0130.03218.90
7.0.110.0080.03418.82
7.0.100.0100.03118.84
7.0.90.0110.03119.03
7.0.80.0110.02818.95
7.0.70.0110.03018.79
7.0.60.0070.03418.79
7.0.50.0080.03118.98
7.0.40.0070.03117.94
7.0.30.0060.03117.97
7.0.20.0030.03817.91
7.0.10.0140.02817.89
7.0.00.0110.02817.96
5.6.380.0140.00314.55
5.6.370.0080.00414.41
5.6.360.0030.01014.46
5.6.350.0090.00914.73
5.6.340.0100.00714.76
5.6.330.0040.01214.39
5.6.320.0120.00514.44
5.6.310.0080.00814.57
5.6.300.0090.00214.29
5.6.290.0050.03317.73
5.6.280.0070.03617.76
5.6.270.0130.03417.82
5.6.260.0150.02717.87
5.6.250.0020.04617.61
5.6.240.0100.03517.70
5.6.230.0050.04017.85
5.6.220.0150.02917.84
5.6.210.0150.02817.79
5.6.200.0030.03717.80
5.6.190.0150.02717.70
5.6.180.0090.03217.81
5.6.170.0120.02917.73
5.6.160.0100.02817.81
5.6.150.0220.02717.81
5.6.140.0080.03817.90
5.6.130.0150.03217.74
5.6.120.0080.03517.82
5.6.110.0110.03617.92
5.6.100.0080.03517.75
5.6.90.0080.03217.72
5.6.80.0170.02317.49
5.6.70.0110.02717.48
5.6.60.0100.03417.49
5.6.50.0170.02317.53
5.6.40.0050.04817.53
5.6.30.0100.03017.34
5.6.20.0030.03717.45
5.6.10.0100.02817.40
5.6.00.0100.03117.32

preferences:
20.73 ms | 403 KiB | 5 Q