3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = '<?xml version="1.0" encoding="utf-8"?> <root total="450" count="4" start="0"> <Code>0</Code> <Item><Person.P_Id>14845</Person.P_Id></Item> <Item><Person.P_Id>14844</Person.P_Id></Item> <Item><Person.P_Id>14837</Person.P_Id></Item> <Item><Person.P_Id>14836</Person.P_Id></Item> </root>'; $xml = simplexml_load_string($xmlstr); $itemobjs = $xml->xpath('//Item'); print_r($itemobjs); $items = array_map(function ($v) { return (string)$v->{'Person.P_Id'}; }, $itemobjs); print_r($items);

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.0130.01317.50
8.4.130.0140.00618.09
8.4.120.0150.00520.88
8.4.110.0110.00922.78
8.4.100.0070.00419.13
8.4.90.0150.00619.18
8.4.80.0130.00820.79
8.4.70.0090.00218.40
8.4.60.0150.00619.23
8.4.50.0110.01119.98
8.4.40.0030.00619.67
8.4.30.0130.00720.59
8.4.20.0130.00719.08
8.4.10.0030.00617.88
8.3.270.0120.00816.80
8.3.260.0120.00716.94
8.3.250.0120.00719.15
8.3.240.0120.00816.68
8.3.230.0100.00919.10
8.3.220.0080.00820.96
8.3.210.0050.00217.17
8.3.200.0050.00416.80
8.3.190.0070.00119.21
8.3.180.0060.00516.85
8.3.170.0040.00717.36
8.3.160.0100.00717.02
8.3.150.0060.01321.31
8.3.140.0110.00716.82
8.3.130.0000.00818.70
8.3.120.0000.01121.03
8.3.110.0040.00416.77
8.3.100.0040.00416.77
8.3.90.0050.00318.78
8.3.80.0100.00017.97
8.3.70.0100.01018.93
8.3.60.0180.00318.80
8.3.50.0070.00718.71
8.3.40.0070.00718.89
8.3.30.0120.00319.02
8.3.20.0040.00420.67
8.3.10.0000.00820.41
8.3.00.0040.00422.69
8.2.290.0140.00620.66
8.2.280.0100.01018.98
8.2.270.0000.00817.65
8.2.260.0040.01420.36
8.2.250.0040.00417.28
8.2.240.0100.00017.70
8.2.230.0090.00620.94
8.2.220.0060.00324.06
8.2.210.0080.00026.77
8.2.200.0060.00316.81
8.2.190.0150.00316.88
8.2.180.0060.00918.37
8.2.170.0140.00722.96
8.2.160.0060.00821.56
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0000.00826.16
8.2.120.0020.00520.20
8.2.110.0030.00622.71
8.2.100.0090.00318.09
8.2.90.0040.00418.00
8.2.80.0040.00419.02
8.2.70.0030.00718.30
8.2.60.0000.00818.47
8.2.50.0030.00618.10
8.2.40.0040.00419.51
8.2.30.0040.00419.63
8.2.20.0020.00518.34
8.2.10.0040.00419.89
8.2.00.0060.00319.71
8.1.330.0140.00522.32
8.1.320.0090.01116.41
8.1.310.0050.00317.21
8.1.300.0090.00016.68
8.1.290.0030.00618.88
8.1.280.0120.00325.92
8.1.270.0000.00922.84
8.1.260.0000.00826.35
8.1.250.0000.00928.09
8.1.240.0080.00024.25
8.1.230.0040.00819.88
8.1.220.0030.00618.15
8.1.210.0040.00418.77
8.1.200.0060.00617.73
8.1.190.0050.00517.72
8.1.180.0000.00818.10
8.1.170.0000.00818.88
8.1.160.0030.00619.23
8.1.150.0040.00419.23
8.1.140.0000.00721.24
8.1.130.0050.00317.79
8.1.120.0000.00717.92
8.1.110.0000.00717.67
8.1.100.0060.00317.93
8.1.90.0050.00217.77
8.1.80.0030.00517.93
8.1.70.0030.00317.76
8.1.60.0030.00618.04
8.1.50.0050.00317.88
8.1.40.0000.00817.78
8.1.30.0030.00618.00
8.1.20.0000.00818.02
8.1.10.0050.00317.90
8.1.00.0020.00517.56
8.0.300.0040.00418.77
8.0.290.0080.00017.13
8.0.280.0000.00718.76
8.0.270.0000.00717.56
8.0.260.0030.00317.07
8.0.250.0080.00017.32
8.0.240.0070.00017.33
8.0.230.0000.00717.25
8.0.220.0030.00317.22
8.0.210.0050.00217.05
8.0.200.0030.00317.36
8.0.190.0000.00817.39
8.0.180.0000.00917.35
8.0.170.0030.00617.35
8.0.160.0070.00017.37
8.0.150.0030.00317.27
8.0.140.0000.00717.05
8.0.130.0030.00313.58
8.0.120.0040.00417.07
8.0.110.0000.00817.22
8.0.100.0070.00317.20
8.0.90.0060.00317.12
8.0.80.0060.00917.21
8.0.70.0030.00517.19
8.0.60.0040.00417.17
8.0.50.0000.00717.28
8.0.30.0040.01217.66
8.0.20.0050.01417.40
8.0.10.0000.00817.45
8.0.00.0130.00717.43
7.4.330.0040.00015.55
7.4.320.0030.00316.75
7.4.300.0000.00716.74
7.4.290.0000.00816.91
7.4.280.0000.00716.77
7.4.270.0070.00016.72
7.4.260.0060.00013.71
7.4.250.0040.00416.95
7.4.240.0020.00617.06
7.4.230.0050.00316.72
7.4.220.0000.00816.90
7.4.210.0050.01217.02
7.4.200.0000.00716.89
7.4.130.0140.00416.73
7.4.120.0140.01017.13
7.4.110.0130.00316.88
7.4.100.0070.01016.89
7.4.90.0100.00716.72
7.4.80.0090.00919.39
7.4.70.0040.01217.02
7.4.60.0000.01816.86
7.4.50.0040.01516.95
7.4.40.0070.01016.57
7.4.10.0100.01015.32
7.4.00.0030.01315.04
7.3.330.0030.00316.66
7.3.320.0030.00313.66
7.3.310.0000.00816.54
7.3.300.0070.00016.51
7.3.290.0030.00316.61
7.3.280.0080.00816.62
7.3.260.0120.00916.75
7.3.240.0110.00816.82
7.3.230.0200.00316.64
7.3.210.0100.00716.82
7.3.200.0040.01216.84
7.3.190.0140.00316.64
7.3.180.0090.00616.77
7.3.170.0000.01616.84
7.3.160.0080.00816.64
7.3.130.0100.00614.70
7.3.120.0050.00815.11
7.3.110.0080.00815.00
7.3.100.0050.01014.85
7.3.90.0070.00714.79
7.3.80.0110.01014.83
7.3.70.0060.00914.93
7.3.60.0070.01014.90
7.3.50.0040.00914.87
7.3.40.0080.00714.83
7.3.30.0080.00714.93
7.3.20.0070.00816.11
7.3.10.0100.00816.09
7.3.00.0090.00816.05
7.2.330.0080.00816.73
7.2.320.0070.01117.24
7.2.310.0040.01417.16
7.2.300.0110.00917.09
7.2.290.0120.00616.96
7.2.260.0030.01415.08
7.2.250.0000.01815.38
7.2.240.0040.01115.27
7.2.230.0030.01215.14
7.2.220.0060.00715.18
7.2.210.0040.01115.28
7.2.200.0080.00815.36
7.2.190.0090.00415.16
7.2.180.0020.01115.18
7.2.170.0090.00815.03
7.2.160.0020.01115.14
7.2.150.0070.00916.53
7.2.140.0040.01216.42
7.2.130.0050.01216.44
7.2.120.0070.00916.39
7.2.110.0100.00716.43
7.2.100.0060.01016.43
7.2.90.0060.01016.49
7.2.80.0090.00516.30
7.2.70.0070.00616.39
7.2.60.0080.00816.46
7.2.50.0090.00816.48
7.2.40.0050.01316.42
7.2.30.0080.00716.62
7.2.20.0090.00716.46
7.2.10.0070.00816.48
7.2.00.0090.00716.38
7.1.330.0100.00215.98
7.1.320.0070.00815.15
7.1.310.0050.01015.31
7.1.300.0050.00915.26
7.1.290.0050.00715.37
7.1.280.0090.00715.28
7.1.270.0080.00815.22
7.1.260.0050.00915.43
7.1.250.0080.00715.32
7.1.240.0030.00915.84
7.1.230.0090.00615.88
7.1.220.0030.00815.77
7.1.210.0040.00715.94
7.1.200.0030.01016.12
7.1.190.0070.00315.82
7.1.180.0040.00815.81
7.1.170.0000.01515.97
7.1.160.0070.00315.80
7.1.150.0040.00815.76
7.1.140.0070.00715.91
7.1.130.0100.00315.78
7.1.120.0000.00816.10
7.1.110.0030.00715.89
7.1.100.0030.01216.07
7.1.90.0110.00415.86
7.1.80.0060.00616.05
7.1.70.0100.00316.06
7.1.60.0060.00616.19
7.1.50.0000.00915.89
7.1.40.0030.00916.25
7.1.30.0000.01415.92
7.1.20.0060.00615.65
7.1.10.0070.01115.85
7.1.00.0040.01215.89

preferences:
30.26 ms | 403 KiB | 5 Q