3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <myXml> <Person> <firstName>pradeep</firstName> <lastName>jain</lastName> <address> <doorNumber>287</doorNumber> <street>2nd block</street> <city>bangalore</city> </address> <phoneNums type="mobile">9980572765</phoneNums> <phoneNums type="landline">080 42056434</phoneNums> <phoneNums type="skype">123456</phoneNums> </Person> <Person> <firstName>pradeep</firstName> <lastName>jain</lastName> <address> <doorNumber>287</doorNumber> <street>2nd block</street> <city>bangalore</city> </address> <phoneNums type="mobile">1</phoneNums> <phoneNums type="landline">2</phoneNums> <phoneNums type="skype">3</phoneNums> </Person> </myXml> XML; $dom = new DOMDocument; $dom->loadXML($xml); $xpath = new DOMXPath($dom); echo count($xpath->evaluate("//phoneNums")) , "\n"; // 6 echo count($xpath->evaluate("//street")) , "\n"; // 2 echo count($xpath->evaluate("//myXml")) , "\n"; // 1 echo count($xpath->evaluate("//Person")) , "\n"; // 2 echo count($xpath->evaluate("//person")) , "\n"; // 0 <-- case-sensitive

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.120.0090.01021.04
8.4.110.0110.00922.95
8.4.100.0110.01018.31
8.4.90.0130.00719.28
8.4.80.0040.00619.98
8.4.70.0100.00518.32
8.4.60.0160.00518.93
8.4.50.0140.00718.23
8.4.40.0160.00318.79
8.4.30.0150.00618.13
8.4.20.0150.00718.13
8.4.10.0040.00718.24
8.3.250.0130.00619.20
8.3.240.0170.00216.85
8.3.230.0060.00217.00
8.3.220.0110.00817.50
8.3.210.0110.00817.09
8.3.200.0080.00116.87
8.3.190.0090.01117.79
8.3.180.0150.00417.00
8.3.170.0120.00617.41
8.3.160.0120.00916.81
8.3.150.0030.01617.43
8.3.140.0140.00419.18
8.3.130.0050.00318.79
8.3.120.0060.00319.15
8.3.110.0100.01020.94
8.3.100.0080.00824.06
8.3.90.0100.01026.77
8.3.80.0070.00418.68
8.3.70.0100.00716.88
8.3.60.0060.00918.81
8.3.50.0090.00418.61
8.3.40.0200.00319.11
8.3.30.0060.00919.07
8.3.20.0090.00019.44
8.3.10.0040.00421.20
8.3.00.0000.00822.70
8.2.290.0130.00620.65
8.2.280.0120.00720.56
8.2.270.0120.00816.77
8.2.260.0070.01117.05
8.2.250.0040.00417.09
8.2.240.0060.00319.20
8.2.230.0110.00422.58
8.2.220.0060.00337.54
8.2.210.0000.00826.77
8.2.200.0090.00017.13
8.2.190.0090.00916.88
8.2.180.0140.00418.79
8.2.170.0070.00722.96
8.2.160.0100.00321.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00421.56
8.2.120.0000.00726.35
8.2.110.0060.00319.61
8.2.100.0060.00617.82
8.2.90.0040.00420.89
8.2.80.0050.00518.28
8.2.70.0040.00418.30
8.2.60.0000.00818.47
8.2.50.0090.00018.10
8.2.40.0000.00719.72
8.2.30.0040.00419.58
8.2.20.0050.00318.56
8.2.10.0050.00218.66
8.2.00.0000.00719.79
8.1.330.0120.00620.81
8.1.320.0100.00916.56
8.1.310.0040.00417.02
8.1.300.0070.00318.31
8.1.290.0040.00430.84
8.1.280.0070.01125.92
8.1.270.0000.00824.18
8.1.260.0030.00626.35
8.1.250.0090.00028.09
8.1.240.0100.00022.38
8.1.230.0130.00021.26
8.1.220.0000.00818.04
8.1.210.0040.00419.54
8.1.200.0060.00317.73
8.1.190.0040.00417.60
8.1.180.0060.00319.55
8.1.170.0050.00319.00
8.1.160.0000.00719.28
8.1.150.0070.00019.31
8.1.140.0040.00418.22
8.1.130.0030.00321.14
8.1.120.0000.00817.95
8.1.110.0040.00417.90
8.1.100.0070.00417.89
8.1.90.0000.00717.68
8.1.80.0060.00317.82
8.1.70.0030.00317.68
8.1.60.0000.00817.89
8.1.50.0040.00417.98
8.1.40.0040.00417.81
8.1.30.0000.00818.08
8.1.20.0000.00818.14
8.1.10.0050.00317.84
8.1.00.0000.00817.73
8.0.300.0040.00420.40
8.0.290.0030.00617.13
8.0.280.0000.00718.74
8.0.270.0070.00017.54
8.0.260.0080.00017.59
8.0.250.0030.00317.45
8.0.240.0000.00717.35
8.0.230.0070.00317.15
8.0.220.0030.00317.16
8.0.210.0000.00717.31
8.0.200.0000.00817.17
8.0.190.0080.00017.45
8.0.180.0040.00417.43
8.0.170.0040.00417.32
8.0.160.0070.00017.36
8.0.150.0050.00317.34
8.0.140.0030.00517.36
8.0.130.0040.00413.73
8.0.120.0000.00817.27
8.0.110.0080.00017.23
8.0.100.0000.00717.15
8.0.90.0020.00517.16
8.0.80.0020.01417.29
8.0.70.0040.00417.16
8.0.60.0040.00417.16
8.0.50.0040.00417.38
8.0.30.0150.00617.46
8.0.20.0090.00917.52
8.0.10.0000.00717.51
8.0.00.0110.00917.10
7.4.330.0000.00515.55
7.4.320.0000.00717.02
7.4.300.0070.00017.05
7.4.290.0070.00017.01
7.4.280.0000.00816.82
7.4.270.0070.00016.99
7.4.260.0040.00416.83
7.4.250.0000.00716.75
7.4.240.0000.00716.74
7.4.230.0000.00716.93
7.4.220.0050.00316.94
7.4.210.0020.01316.98
7.4.200.0000.00717.00
7.4.160.0120.00416.95
7.4.140.0120.01017.86
7.4.130.0100.01316.98
7.4.120.0100.01016.92
7.4.110.0060.01116.97
7.4.100.0230.00016.98
7.4.90.0090.00916.98
7.4.80.0090.00919.39
7.4.70.0120.01216.82
7.4.60.0040.01516.74
7.4.50.0060.00616.59
7.4.40.0100.01017.11
7.4.00.0060.01115.26
7.3.330.0000.00813.58
7.3.320.0000.00613.56
7.3.310.0030.00316.49
7.3.300.0070.00016.71
7.3.290.0040.00416.70
7.3.280.0100.01016.63
7.3.260.0100.01016.80
7.3.240.0100.00716.71
7.3.230.0070.01016.95
7.3.210.0030.01416.82
7.3.200.0100.00616.53
7.3.190.0060.01016.65
7.3.180.0080.00816.83
7.3.170.0060.01016.77
7.3.160.0060.01116.73
7.3.120.0030.01415.04
7.3.110.0080.00815.05
7.3.100.0050.00814.86
7.3.90.0080.00814.79
7.3.80.0070.00314.85
7.3.70.0050.01014.94
7.3.60.0020.00914.89
7.3.50.0080.00515.08
7.3.40.0110.00415.05
7.3.30.0080.00814.85
7.3.20.0110.00316.73
7.3.10.0070.01016.81
7.3.00.0080.00516.86
7.2.330.0150.00616.95
7.2.320.0070.01117.11
7.2.310.0140.01017.02
7.2.300.0170.00716.67
7.2.290.0130.01016.99
7.2.250.0040.01515.48
7.2.240.0050.01015.16
7.2.230.0070.00715.42
7.2.220.0060.00715.40
7.2.210.0050.00815.15
7.2.200.0050.01015.32
7.2.190.0050.01015.13
7.2.180.0050.00915.14
7.2.170.0080.00715.19
7.2.160.0030.00715.45
7.2.150.0070.00417.34
7.2.140.0030.00917.09
7.2.130.0060.00916.96
7.2.120.0000.01517.03
7.2.110.0070.01017.20
7.2.100.0030.00616.97
7.2.90.0120.00316.98
7.2.80.0060.00917.29
7.2.70.0500.01216.15
7.2.60.0460.01416.06
7.2.50.0460.00816.01
7.2.40.0470.00715.97
7.2.30.0550.00616.03
7.2.20.0490.01116.02
7.2.10.0460.00915.99
7.2.00.0530.00316.02
7.1.330.0010.01015.83
7.1.320.0070.00415.86
7.1.310.0050.01015.93
7.1.300.0060.00615.80
7.1.290.0080.00715.78
7.1.280.0060.01015.87
7.1.270.0050.01115.80
7.1.260.0090.00716.00
7.1.250.0030.00716.11
7.1.200.0000.01415.82
7.1.170.1230.00014.03
7.1.160.0920.00914.02
7.1.150.0920.01313.68
7.1.140.0690.01613.66
7.1.130.0830.01013.73
7.1.120.1000.00313.72
7.1.110.0940.01013.97
7.1.100.0860.01013.68
7.1.90.1380.01013.85
7.1.80.1280.01014.18
7.1.70.0620.00913.93
7.1.60.1710.01631.87
7.1.50.2080.00331.79
7.1.40.1580.01931.82
7.1.30.1990.01031.88
7.1.20.1800.01331.40
7.1.10.0090.00813.77
7.1.00.0150.00313.87

preferences:
21.16 ms | 403 KiB | 5 Q