3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <Success/> <parent> <child name='Child1' /> <child name='Child2' /> <subparent> <child name='Child3' /> </subparent> </parent> <child name='Child4' /> </root>"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( './//child') as $child) { echo $child->attributes()['name'] . "\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.0030.01517.00
8.3.50.0070.01122.24
8.3.40.0140.00719.03
8.3.30.0070.00719.54
8.3.20.0040.00420.72
8.3.10.0000.00923.92
8.3.00.0070.00019.52
8.2.180.0160.00317.00
8.2.170.0090.00922.96
8.2.160.0070.00720.91
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0100.00726.16
8.2.120.0000.00819.98
8.2.110.0030.00622.76
8.2.100.0040.00818.34
8.2.90.0070.00019.64
8.2.80.0000.00817.97
8.2.70.0100.00017.88
8.2.60.0050.00518.30
8.2.50.0000.00818.07
8.2.40.0050.00520.07
8.2.30.0040.00418.73
8.2.20.0030.00618.22
8.2.10.0000.00818.54
8.2.00.0000.00819.84
8.1.280.0110.00425.92
8.1.270.0030.00624.29
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00324.22
8.1.230.0040.00819.62
8.1.220.0090.00018.14
8.1.210.0030.00518.77
8.1.200.0000.01017.73
8.1.190.0080.00017.60
8.1.180.0050.00318.10
8.1.170.0080.00018.89
8.1.160.0070.00022.37
8.1.150.0050.00318.98
8.1.140.0050.00317.77
8.1.130.0040.00218.16
8.1.120.0040.00417.69
8.1.110.0060.00317.93
8.1.100.0020.00517.86
8.1.90.0050.00217.66
8.1.80.0040.00417.92
8.1.70.0000.00717.65
8.1.60.0030.00617.85
8.1.50.0000.00817.97
8.1.40.0050.00317.70
8.1.30.0070.00317.86
8.1.20.0000.00818.10
8.1.10.0000.00817.68
8.1.00.0070.00017.84
8.0.300.0000.00718.77
8.0.290.0000.00717.13
8.0.280.0030.00318.77
8.0.270.0000.00717.67
8.0.260.0000.00717.64
8.0.250.0070.00017.34
8.0.240.0000.00717.25
8.0.230.0070.00017.48
8.0.220.0050.00217.37
8.0.210.0040.00417.16
8.0.200.0000.00617.45
8.0.190.0000.00917.45
8.0.180.0040.00417.21
8.0.170.0070.00017.45
8.0.160.0040.00417.18
8.0.150.0000.00817.11
8.0.140.0000.00717.18
8.0.130.0050.00013.75
8.0.120.0050.00317.27
8.0.110.0070.00017.28
8.0.100.0050.00317.23
8.0.90.0050.00317.30
8.0.80.0040.01117.34
8.0.70.0000.00817.28
8.0.60.0050.00317.28
8.0.50.0000.00717.15
8.0.30.0130.01017.51
8.0.20.0180.00317.51
8.0.10.0070.00017.50
8.0.00.0130.00717.16
7.4.330.0030.00315.52
7.4.320.0030.00316.96
7.4.300.0060.00016.98
7.4.290.0040.00416.88
7.4.280.0040.00417.05
7.4.270.0030.00516.95
7.4.260.0030.00316.82
7.4.250.0000.00816.70
7.4.240.0050.00216.96
7.4.230.0040.00316.75
7.4.220.0100.00716.81
7.4.210.0080.00616.80
7.4.200.0040.00417.05
7.4.160.0110.00816.96
7.4.150.0090.01217.40
7.4.140.0120.00717.86
7.4.130.0050.01216.89
7.4.120.0140.00916.92
7.4.110.0070.01016.97
7.4.100.0140.00316.83
7.4.90.0070.01016.73
7.4.80.0100.01019.39
7.4.70.0110.00617.04
7.4.60.0090.00916.81
7.4.50.0000.00417.13
7.4.40.0000.01616.88
7.4.30.0100.00617.01
7.4.00.0050.01214.99
7.3.330.0070.00013.56
7.3.320.0030.00313.34
7.3.310.0000.00716.46
7.3.300.0050.00216.57
7.3.290.0060.01516.53
7.3.280.0090.01016.56
7.3.270.0140.00717.40
7.3.260.0110.01116.86
7.3.250.0100.01016.74
7.3.240.0120.00916.88
7.3.230.0110.00516.88
7.3.210.0030.01416.53
7.3.200.0100.00719.39
7.3.190.0060.01216.86
7.3.180.0060.00916.63
7.3.170.0120.00616.62
7.3.160.0110.00616.79
7.3.120.0080.00814.95
7.3.10.0140.00416.90
7.3.00.0070.01116.55
7.2.330.0080.00916.81
7.2.320.0110.01016.71
7.2.310.0080.00917.04
7.2.300.0140.00316.71
7.2.290.0060.01216.79
7.2.130.0090.00616.70
7.2.120.0100.00016.82
7.2.110.0040.00817.22
7.2.100.0090.00616.97
7.2.90.0030.01016.93
7.2.80.0070.00716.66
7.2.70.0080.00416.80
7.2.60.0070.01117.04
7.2.50.0000.01016.75
7.2.40.0060.00916.69
7.2.30.0090.00316.89
7.2.20.0030.00616.77
7.2.10.0030.00916.63
7.2.00.0020.01218.21
7.1.250.0070.00715.65
7.1.100.0060.00618.04
7.1.70.0030.01516.89
7.1.60.0130.01319.70
7.1.50.0030.00717.10
7.1.00.0100.08322.61
7.0.200.0040.00417.08
7.0.140.0100.06722.25
7.0.60.0130.07720.12
7.0.50.0070.04717.98
7.0.40.0100.07020.52
7.0.30.0070.05020.28
7.0.20.0300.08020.31
7.0.10.0130.08320.40
7.0.00.0000.09020.27
5.6.280.0030.07321.21
5.6.210.0100.08720.78
5.6.200.0100.07718.37
5.6.190.0030.09320.85
5.6.180.4000.04020.63
5.6.170.0170.04720.72
5.6.160.0030.04320.72
5.6.150.0100.04718.44
5.6.140.0100.07018.31
5.6.130.0070.06718.31
5.6.120.0130.04321.30
5.6.110.0100.04021.23
5.6.100.0070.08021.20
5.6.90.0030.09021.24
5.6.80.0070.06320.55
5.6.70.4500.03720.61
5.5.350.0030.08020.55
5.5.340.0130.08018.16
5.5.330.0070.04320.40
5.5.320.0230.07720.51
5.5.310.0330.07720.47
5.5.300.0070.03718.16
5.5.290.0030.08018.10
5.5.280.0000.04721.13
5.5.270.0170.04021.00
5.5.260.0100.03721.00
5.5.250.0070.06320.82
5.5.240.0300.07320.37
5.4.450.0130.04729.29
5.4.440.0370.04729.25
5.4.430.0670.04325.65
5.4.420.0370.04723.83
5.4.410.0230.04322.40
5.4.400.0300.04321.57
5.4.390.0430.04021.56
5.4.380.0170.05318.87
5.4.370.0030.06318.66
5.4.360.0230.04018.91
5.4.350.0170.05018.86
5.4.340.0100.05318.62
5.4.320.0090.03512.73
5.4.310.0060.04012.73
5.4.300.0080.03512.73
5.4.290.0050.04012.72
5.4.280.0040.04212.63
5.4.270.0070.04112.62
5.4.260.0100.03812.62
5.4.250.0010.04212.63
5.4.240.0040.03812.63
5.4.230.0040.04012.61
5.4.220.0060.04412.61
5.4.210.0040.03812.62
5.4.200.0080.03512.61
5.4.190.0050.03612.61
5.4.180.0120.03512.61
5.4.170.0100.03312.63
5.4.160.0080.03812.62
5.4.150.0090.04412.62
5.4.140.0090.03412.30
5.4.130.0030.03912.29
5.4.120.0030.03912.24
5.4.110.0030.04012.24
5.4.100.0070.03712.24
5.4.90.0060.03612.24
5.4.80.0090.04312.24
5.4.70.0060.04212.24
5.4.60.0080.03312.23
5.4.50.0040.03712.23
5.4.40.0070.03612.21
5.4.30.0080.03312.21
5.4.20.0130.02912.22
5.4.10.0040.03612.22
5.4.00.0040.03711.71
5.3.290.0070.04012.80
5.3.280.0040.04712.71
5.3.270.0060.04012.72
5.3.260.0070.03912.72
5.3.250.0070.03512.72
5.3.240.0060.04212.72
5.3.230.0040.03912.71
5.3.220.0050.03712.68
5.3.210.0050.04012.68
5.3.200.0080.03512.68
5.3.190.0060.03712.67
5.3.180.0050.03812.67
5.3.170.0060.03812.67
5.3.160.0040.03912.68
5.3.150.0070.03612.67
5.3.140.0040.04512.66
5.3.130.0040.04012.65
5.3.120.0080.04412.66
5.3.110.0080.03812.66
5.3.100.0090.04912.12
5.3.90.0060.03712.08
5.3.80.0050.03812.08
5.3.70.0080.03512.08
5.3.60.0050.03912.07
5.3.50.0080.03412.00
5.3.40.0060.03612.00
5.3.30.0070.03311.95
5.3.20.0070.03511.73
5.3.10.0060.03411.70
5.3.00.0060.03611.69
5.2.170.0030.0359.19
5.2.160.0010.0339.19
5.2.150.0040.0319.18
5.2.140.0050.0309.18
5.2.130.0040.0299.14
5.2.120.0030.0299.14
5.2.110.0050.0309.15
5.2.100.0050.0399.14
5.2.90.0030.0369.14
5.2.80.0040.0339.14
5.2.70.0060.0299.14
5.2.60.0040.0329.09
5.2.50.0050.0399.07
5.2.40.0070.0319.04
5.2.30.0040.0309.01
5.2.20.0060.0309.00
5.2.10.0050.0298.93
5.2.00.0060.0358.79
5.1.60.0040.0258.07
5.1.50.0020.0318.07
5.1.40.0050.0348.05
5.1.30.0080.0248.40
5.1.20.0040.0278.42
5.1.10.0050.0268.14
5.1.00.0050.0298.15
5.0.50.0060.0206.62
5.0.40.0050.0186.49
5.0.30.0020.0326.29
5.0.20.0020.0206.27
5.0.10.0030.0246.24
5.0.00.0040.0306.24
4.4.90.0020.0164.78
4.4.80.0040.0144.75
4.4.70.0040.0154.75
4.4.60.0040.0144.75
4.4.50.0060.0134.77
4.4.40.0040.0254.71
4.4.30.0030.0184.76
4.4.20.0040.0154.85
4.4.10.0020.0164.85
4.4.00.0040.0304.76
4.3.110.0040.0204.67
4.3.100.0040.0144.67
4.3.90.0060.0154.63
4.3.80.0030.0234.59
4.3.70.0040.0154.63
4.3.60.0060.0174.63
4.3.50.0020.0204.63
4.3.40.0020.0284.54
4.3.30.0020.0223.29
4.3.20.0010.0173.27
4.3.10.0020.0163.23
4.3.00.0000.02021.36

preferences:
38.5 ms | 401 KiB | 5 Q