3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <lookups> <lookup category="General" field="Country Code" value="FI" entityId="1" active="true" /> <lookup category="General" field="Country Name" value="Finland" entityId="2" active="true" /> <lookup category="General" field="Country Code" value="FI2" entityId="1" active="true" /> <lookup category="General" field="Country Name" value="Finland2" entityId="3" active="true" /> <lookup category="General" field="Country Code" value="FI3" entityId="1" active="true" /> <lookup category="General" field="Country Name" value="Finland3" entityId="4" active="true" /> <lookup category="General" field="Country Code" value="FI4" entityId="1" active="true" /> <lookup category="General" field="Country Name" value="Finland4" entityId="5" active="true" /> </lookups> XML; $xml=simplexml_load_string($str); $result=$xml->xpath('//lookup[@Country Code][@Country Name]'); foreach($result as $node) { echo $node->attributes()->id."\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.3.60.0110.00718.93
8.3.50.0150.00416.86
8.3.40.0090.00619.17
8.3.30.0140.00418.79
8.3.20.0000.00819.26
8.3.10.0040.00422.01
8.3.00.0040.00421.23
8.2.180.0070.01418.88
8.2.170.0110.00722.96
8.2.160.0030.01022.59
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0040.00422.75
8.2.120.0040.00426.35
8.2.110.0180.00020.63
8.2.100.0040.00718.22
8.2.90.0040.00419.60
8.2.80.0040.00418.38
8.2.70.0040.00417.88
8.2.60.0000.00818.17
8.2.50.0030.00618.17
8.2.40.0040.00420.89
8.2.30.0000.00921.34
8.2.20.0040.00418.33
8.2.10.0040.00418.40
8.2.00.0000.00718.31
8.1.280.0090.00625.92
8.1.270.0040.00422.55
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00423.03
8.1.230.0110.00019.52
8.1.220.0000.00918.41
8.1.210.0040.00418.77
8.1.200.0030.00717.85
8.1.190.0050.00317.72
8.1.180.0000.00818.10
8.1.170.0040.00419.01
8.1.160.0040.00419.31
8.1.150.0030.00520.96
8.1.140.0040.00419.90
8.1.130.0040.00419.41
8.1.120.0030.00417.68
8.1.110.0000.00717.93
8.1.100.0030.00517.63
8.1.90.0040.00417.69
8.1.80.0000.00817.96
8.1.70.0000.00717.75
8.1.60.0080.00018.02
8.1.50.0000.00817.77
8.1.40.0000.00817.92
8.1.30.0040.00418.07
8.1.20.0000.01018.12
8.1.10.0040.00417.69
8.1.00.0000.00817.84
8.0.300.0000.00818.77
8.0.290.0060.00317.13
8.0.280.0000.00818.91
8.0.270.0030.00517.45
8.0.260.0030.00317.19
8.0.250.0000.00717.50
8.0.240.0040.00417.27
8.0.230.0000.00717.31
8.0.220.0000.00917.41
8.0.210.0030.00317.32
8.0.200.0060.00017.25
8.0.190.0000.00817.26
8.0.180.0030.00517.21
8.0.170.0030.00617.38
8.0.160.0000.00817.37
8.0.150.0040.00417.20
8.0.140.0000.00717.38
8.0.130.0030.00613.65
8.0.120.0000.00817.31
8.0.110.0000.00717.45
8.0.100.0070.00017.21
8.0.90.0000.00717.32
8.0.80.0060.01317.44
8.0.70.0040.00417.20
8.0.60.0000.00817.18
8.0.50.0040.00417.28
8.0.30.0100.00717.32
8.0.20.0090.01017.47
8.0.10.0050.00317.40
8.0.00.0110.00717.01
7.4.330.0000.00515.55
7.4.320.0030.00316.88
7.4.300.0030.00316.94
7.4.290.0060.00317.05
7.4.280.0080.00016.66
7.4.270.0040.00417.05
7.4.260.0000.00513.64
7.4.250.0040.00416.86
7.4.240.0080.00016.95
7.4.230.0000.00716.90
7.4.220.0030.01916.78
7.4.210.0040.01116.92
7.4.200.0050.00216.85
7.4.160.0150.00616.78
7.4.150.0130.01017.40
7.4.140.0110.00717.86
7.4.130.0050.01416.95
7.4.120.0110.00716.86
7.4.110.0030.01616.85
7.4.100.0090.00816.75
7.4.90.0030.01416.97
7.4.80.0140.00319.39
7.4.70.0070.01016.84
7.4.60.0090.00616.91
7.4.50.0030.01016.74
7.4.40.0080.00816.80
7.4.30.0120.00616.69
7.4.10.0070.01114.81
7.4.00.0050.01215.25
7.3.330.0000.00613.60
7.3.320.0030.00313.59
7.3.310.0070.00016.56
7.3.300.0000.00716.53
7.3.290.0070.00716.57
7.3.280.0080.00816.60
7.3.270.0100.00617.40
7.3.260.0080.01016.51
7.3.250.0120.00716.54
7.3.240.0050.01116.75
7.3.230.0110.01116.66
7.3.210.0030.01416.73
7.3.200.0170.00017.05
7.3.190.0060.01016.85
7.3.180.0090.00916.63
7.3.170.0100.00716.72
7.3.160.0060.00916.70
7.3.130.0070.01414.86
7.3.120.0120.00614.65
7.3.110.0120.00815.08
7.3.100.0140.00014.91
7.3.90.0000.01815.13
7.3.80.0070.01015.10
7.3.70.0000.01414.93
7.3.60.0090.00614.75
7.3.50.0040.01215.08
7.3.40.0060.01014.66
7.3.30.0040.01114.70
7.3.20.0070.00416.89
7.3.10.0040.01116.81
7.3.00.0110.00316.75
7.2.330.0140.00517.13
7.2.320.0110.01216.93
7.2.310.0110.00717.05
7.2.300.0070.01016.84
7.2.290.0100.00617.01
7.2.260.0040.01514.89
7.2.250.0090.01214.94
7.2.240.0000.01515.06
7.2.230.0030.01315.25
7.2.220.0100.01015.03
7.2.210.0070.00715.08
7.2.200.0040.00714.88
7.2.190.0060.00615.39
7.2.180.0070.01114.97
7.2.170.0000.01214.95
7.2.160.0100.00315.13
7.2.150.0100.00317.02
7.2.140.0080.00417.00
7.2.130.0070.00716.98
7.2.120.0050.00516.91
7.2.110.0030.00717.02
7.2.100.0070.00716.99
7.2.90.0130.00316.88
7.2.80.0060.00316.79
7.2.70.0050.00517.11
7.2.60.0020.01216.96
7.2.50.0030.01316.89
7.2.40.0030.01017.00
7.2.30.0130.00317.09
7.2.20.0040.01216.72
7.2.10.0070.00417.20
7.2.00.0180.00718.28
7.1.330.0070.00715.93
7.1.320.0100.00315.80
7.1.310.0070.00416.12
7.1.300.0030.01415.86
7.1.290.0060.00615.88
7.1.280.0080.00815.87
7.1.270.0090.00316.01
7.1.260.0000.00915.96
7.1.250.0060.01015.72
7.1.240.0120.00016.03
7.1.230.0030.01315.86
7.1.220.0100.00315.63
7.1.210.0120.00315.88
7.1.200.0070.00515.91
7.1.190.0000.00915.82
7.1.180.0130.00015.81
7.1.170.0030.00716.25
7.1.160.0060.00916.21
7.1.150.0070.00715.86
7.1.140.0070.01015.89
7.1.130.0040.00815.94
7.1.120.0080.00615.93
7.1.110.0000.01415.84
7.1.100.0050.01017.08
7.1.90.0070.00415.93
7.1.80.0130.00315.95
7.1.70.0050.00816.63
7.1.60.0600.00624.38
7.1.50.0470.01024.62
7.1.40.0470.01024.21
7.1.30.0620.01324.41
7.1.20.0450.01224.31
7.1.10.0410.00815.33
7.1.00.0380.00615.48
7.0.330.0040.00715.54
7.0.320.0100.00315.55
7.0.310.0030.00515.62
7.0.300.0030.01015.59
7.0.290.0030.00615.70
7.0.280.0070.00415.73
7.0.270.0040.01115.74
7.0.260.0000.01315.57
7.0.250.0030.00615.47
7.0.240.0030.01015.60
7.0.230.0060.00915.74
7.0.220.0060.00915.56
7.0.210.0120.00815.55
7.0.200.0610.00615.23
7.0.190.0540.00915.35
7.0.180.0480.00615.07
7.0.170.0620.01215.15
7.0.160.0480.00715.08
7.0.150.0390.00715.18
7.0.140.0370.01015.13
7.0.130.0370.00815.24
7.0.120.0350.00815.23
7.0.110.0390.00515.16
7.0.100.0370.00815.23
7.0.90.0350.00815.08
7.0.80.0370.00215.35
7.0.70.0600.00415.18
7.0.60.0350.00715.25
7.0.50.0350.00715.26
7.0.40.0380.00314.30
7.0.30.0320.01014.27
7.0.20.0370.00514.21
7.0.10.0300.00814.27
7.0.00.0450.00514.32
5.6.400.0060.00614.36
5.6.390.0070.00414.34
5.6.380.0040.00714.49
5.6.370.0000.00914.41
5.6.360.0060.00614.66
5.6.350.0070.00714.75
5.6.340.0060.00614.54
5.6.330.0030.01014.45
5.6.320.0040.01114.56
5.6.310.0000.01714.50
5.6.300.0030.01014.43
5.6.290.0000.01314.54
5.6.280.0070.01014.70
5.6.270.0030.00614.40
5.6.260.0030.01014.37
5.6.250.0040.00814.46
5.6.240.0040.00714.11
5.6.230.0000.00914.25
5.6.220.0090.00314.42
5.6.210.0100.00314.82
5.6.200.0040.00714.13
5.6.190.0030.00714.45
5.6.180.0040.00814.57
5.6.170.0030.01014.56
5.6.160.0030.00914.48
5.6.150.0030.01214.48
5.6.140.0060.00914.38
5.6.130.0130.00314.75
5.6.120.0120.00614.57
5.6.110.0030.01014.71
5.6.100.0040.01114.75
5.6.90.0000.00914.29
5.6.80.0060.00614.34
5.6.70.0030.00814.54
5.6.60.0030.01114.18
5.6.50.0060.00614.52
5.6.40.0060.00614.51
5.6.30.0100.00714.41
5.6.20.0030.00714.70
5.6.10.0000.01114.39
5.6.00.0030.00714.26

preferences:
53.14 ms | 401 KiB | 5 Q