3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' >aaa</child> <child name='Child2' >sss</child> <subparent> <child name='Child3' /> </subparent> </parent> <child name='Child4' /> </root>"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( '/parent') as $child => $data) { echo $data->child . "\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.0100.00718.93
8.3.50.0100.00721.26
8.3.40.0090.00618.83
8.3.30.0030.01019.42
8.3.20.0040.00420.46
8.3.10.0040.00422.16
8.3.00.0030.00519.63
8.2.180.0110.00417.00
8.2.170.0120.00322.96
8.2.160.0140.00320.77
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0080.00022.74
8.2.110.0070.00320.90
8.2.100.0120.00318.03
8.2.90.0000.00818.13
8.2.80.0000.00819.11
8.2.70.0040.00417.88
8.2.60.0000.00817.88
8.2.50.0070.00318.07
8.2.40.0040.00418.72
8.2.30.0000.00818.38
8.2.20.0000.00818.06
8.2.10.0000.00818.65
8.2.00.0040.00418.09
8.1.280.0150.00625.92
8.1.270.0050.00324.29
8.1.260.0050.00226.35
8.1.250.0080.00828.09
8.1.240.0100.00019.50
8.1.230.0090.00323.10
8.1.220.0000.00919.06
8.1.210.0030.00618.77
8.1.200.0000.00817.73
8.1.190.0040.00417.60
8.1.180.0000.00818.10
8.1.170.0060.00319.03
8.1.160.0030.00522.41
8.1.150.0030.00719.37
8.1.140.0050.00217.85
8.1.130.0000.00818.16
8.1.120.0000.00817.68
8.1.110.0040.00417.82
8.1.100.0050.00317.91
8.1.90.0050.00317.89
8.1.80.0000.00717.68
8.1.70.0070.00017.86
8.1.60.0030.00718.02
8.1.50.0000.00817.84
8.1.40.0040.00417.73
8.1.30.0090.00017.82
8.1.20.0080.00017.86
8.1.10.0040.00417.80
8.1.00.0000.00817.80
8.0.300.0040.00418.77
8.0.290.0080.00017.00
8.0.280.0000.00718.86
8.0.270.0070.00017.64
8.0.260.0000.00917.58
8.0.250.0030.00317.32
8.0.240.0030.00317.36
8.0.230.0000.00717.39
8.0.220.0030.00317.11
8.0.210.0070.00017.38
8.0.200.0050.00217.36
8.0.190.0080.00017.38
8.0.180.0000.00717.34
8.0.170.0050.00217.12
8.0.160.0070.00017.30
8.0.150.0040.00417.26
8.0.140.0040.00317.33
8.0.130.0040.00413.82
8.0.120.0030.00617.30
8.0.110.0040.00417.33
8.0.100.0070.00017.27
8.0.90.0030.00517.09
8.0.80.0080.01017.28
8.0.70.0050.00317.07
8.0.60.0070.00017.40
8.0.50.0040.00417.23
8.0.30.0160.00617.40
8.0.20.0070.01317.43
8.0.10.0040.00417.35
8.0.00.0160.00217.15
7.4.330.0050.00015.00
7.4.320.0030.00317.02
7.4.300.0030.00316.96
7.4.290.0040.00416.96
7.4.280.0040.00416.99
7.4.270.0050.00316.93
7.4.260.0050.00216.96
7.4.250.0040.00416.66
7.4.240.0050.00216.92
7.4.230.0000.00717.12
7.4.220.0100.00717.04
7.4.210.0110.00316.88
7.4.200.0040.00416.96
7.4.160.0180.00316.94
7.4.150.0130.00617.40
7.4.140.0110.00817.86
7.4.130.0110.00816.86
7.4.120.0080.00916.95
7.4.110.0100.00716.87
7.4.100.0100.01016.89
7.4.90.0110.00616.84
7.4.80.0110.00719.39
7.4.70.0090.00916.89
7.4.60.0100.01316.75
7.4.50.0030.00616.96
7.4.40.0080.00916.79
7.4.30.0100.00716.86
7.4.00.0030.01315.19
7.3.330.0050.00013.26
7.3.320.0050.00013.24
7.3.310.0000.00716.65
7.3.300.0000.00816.71
7.3.290.0060.01016.48
7.3.280.0050.01016.60
7.3.270.0110.00717.40
7.3.260.0060.01316.69
7.3.250.0090.00816.60
7.3.240.0090.00916.56
7.3.230.0090.00916.98
7.3.210.0030.01316.65
7.3.200.0070.01319.39
7.3.190.0140.00316.98
7.3.180.0100.00616.49
7.3.170.0100.00716.74
7.3.160.0070.01016.87
7.3.120.0070.01115.06
7.3.110.0100.01014.81
7.3.100.0030.00614.72
7.3.90.0100.00714.95
7.3.80.0070.01115.08
7.3.70.0000.02014.88
7.3.60.0090.00614.64
7.3.50.0060.00914.81
7.3.40.0090.00014.96
7.3.30.0070.01014.96
7.3.20.0000.01016.57
7.3.10.0040.00716.87
7.3.00.0030.00616.88
7.2.330.0100.00716.76
7.2.320.0100.01216.91
7.2.310.0080.00817.13
7.2.300.0120.00916.88
7.2.290.0120.00916.89
7.2.250.0000.01815.10
7.2.240.0130.00715.11
7.2.230.0060.00915.13
7.2.220.0100.00715.32
7.2.210.0110.00715.44
7.2.200.0030.01314.91
7.2.190.0040.00815.34
7.2.180.0060.01015.36
7.2.170.0040.01415.10
7.2.00.0030.00919.61
7.1.330.0030.00916.13
7.1.320.0040.01115.76
7.1.310.0070.00715.79
7.1.300.0080.00415.72
7.1.290.0090.00616.02
7.1.280.0100.00315.84
7.1.270.0070.01015.78
7.1.260.0080.00415.86
7.1.100.0080.00318.04
7.1.70.0030.00616.94
7.1.60.0100.01419.32
7.1.50.0070.01816.95
7.1.00.0100.07022.62
7.0.200.0000.01016.97
7.0.140.0030.07322.31
7.0.60.0170.03020.23
7.0.50.0130.04318.03
7.0.40.0070.06020.13
7.0.30.0430.05720.31
7.0.20.0230.04020.32
7.0.10.0000.09720.22
7.0.00.0100.08720.38
5.6.280.0000.07721.11
5.6.210.0230.07020.71
5.6.200.0030.06718.32
5.6.190.0100.07320.85
5.6.180.0430.07320.88
5.6.170.0470.06720.70
5.6.160.0030.04020.66
5.6.150.0070.07018.37
5.6.140.0030.04018.41
5.6.130.0130.07718.29
5.6.120.0070.05720.94
5.6.110.0070.04021.14
5.6.100.0170.04721.22
5.6.90.0100.08321.26
5.6.80.0130.07320.69
5.5.350.0100.09020.64
5.5.340.0100.07318.19
5.5.330.0030.04320.43
5.5.320.0530.06320.43
5.5.310.0370.06020.52
5.5.300.0030.04018.21
5.5.290.0030.04718.14
5.5.280.0070.08320.87
5.5.270.0200.07320.99
5.5.260.0070.07720.91
5.5.250.0000.06020.89
5.5.240.0130.05720.43
5.4.450.0900.04319.43
5.4.440.0700.05019.67
5.4.430.0570.03319.39
5.4.420.0670.00019.61
5.4.410.0730.00019.55
5.4.400.0670.00019.31
5.4.390.0630.00019.14
5.4.380.0670.00019.23
5.4.370.0630.00019.22
5.4.360.0770.00019.26
5.4.350.0900.00019.26
5.4.340.0090.03312.21
5.4.320.0040.04512.70
5.4.310.0060.04012.69
5.4.300.0070.03512.70
5.4.290.0060.03812.70
5.4.280.0050.03712.60
5.4.270.0060.03612.60
5.4.260.0090.03512.59
5.4.250.0060.03812.59
5.4.240.0050.03712.59
5.4.230.0040.04212.59
5.4.220.0080.03412.59
5.4.210.0050.03612.59
5.4.200.0050.03912.59
5.4.190.0050.03712.59
5.4.180.0040.03812.58
5.4.170.0030.04012.60
5.4.160.0070.03512.60
5.4.150.0050.03712.59
5.4.140.0040.04012.28
5.4.130.0070.03412.27
5.4.120.0080.03612.22
5.4.110.0050.04112.22
5.4.100.0060.03712.22
5.4.90.0070.03612.21
5.4.80.0080.03512.22
5.4.70.0050.04412.21
5.4.60.0040.03712.21
5.4.50.0070.03412.20
5.4.40.0080.03312.19
5.4.30.0060.03612.19
5.4.20.0090.03512.19
5.4.10.0110.03012.19
5.4.00.0070.03811.68
5.3.290.0080.05112.96
5.3.280.0130.03712.89
5.3.270.0090.03712.91
5.3.260.0050.04112.90
5.3.250.0090.03512.91
5.3.240.0070.03712.90
5.3.230.0070.03712.89
5.3.220.0050.04012.87
5.3.210.0050.04112.86
5.3.200.0040.03912.87
5.3.190.0040.04012.86
5.3.180.0080.04912.86
5.3.170.0070.04612.86
5.3.160.0070.03812.86
5.3.150.0030.04012.86
5.3.140.0080.03512.85
5.3.130.0060.04412.85
5.3.120.0070.04012.85
5.3.110.0040.04212.85
5.3.100.0060.03712.33
5.3.90.0070.03512.32
5.3.80.0040.03712.30
5.3.70.0090.03512.30
5.3.60.0080.03412.29
5.3.50.0040.03812.23
5.3.40.0110.03212.23
5.3.30.0070.03312.20
5.3.20.0050.03611.97
5.3.10.0040.03611.95
5.3.00.0060.03611.93
5.2.170.0040.0329.43
5.2.160.0060.0279.43
5.2.150.0080.0299.43
5.2.140.0050.0309.43
5.2.130.0100.0319.39
5.2.120.0060.0329.39
5.2.110.0050.0329.39
5.2.100.0050.0289.39
5.2.90.0060.0279.38
5.2.80.0020.0349.38
5.2.70.0050.0339.38
5.2.60.0070.0419.34
5.2.50.0090.0399.30
5.2.40.0050.0379.29
5.2.30.0100.0339.26
5.2.20.0050.0299.25
5.2.10.0060.0279.17
5.2.00.0010.0329.03
5.1.60.0040.0248.32
5.1.50.0030.0268.31
5.1.40.0040.0318.29
5.1.30.0020.0288.64
5.1.20.0050.0258.66
5.1.10.0060.0248.39
5.1.00.0030.0278.39
5.0.50.0070.0176.85
5.0.40.0080.0156.71
5.0.30.0030.0326.53
5.0.20.0060.0176.50
5.0.10.0040.0196.48
5.0.00.0010.0336.47
4.4.90.0030.0164.78
4.4.80.0020.0164.75
4.4.70.0030.0154.76
4.4.60.0030.0154.76
4.4.50.0050.0154.77
4.4.40.0010.0274.71
4.4.30.0010.0174.76
4.4.20.0030.0154.85
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0020.0164.67
4.3.100.0030.0144.67
4.3.90.0030.0144.64
4.3.80.0040.0244.58
4.3.70.0000.0184.63
4.3.60.0030.0154.63
4.3.50.0040.0154.63
4.3.40.0020.0254.54
4.3.30.0030.0153.28
4.3.20.0080.0113.26
4.3.10.0050.0153.22
4.3.00.0170.01313.37

preferences:
38.07 ms | 401 KiB | 5 Q