3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <send/> <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.0140.00717.00
8.3.50.0120.00922.15
8.3.40.0140.00319.23
8.3.30.0100.00319.38
8.3.20.0050.00220.49
8.3.10.0040.00423.84
8.3.00.0040.00421.27
8.2.180.0180.00418.57
8.2.170.0110.00922.96
8.2.160.0170.00022.58
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0000.00919.78
8.2.110.0060.00322.75
8.2.100.0110.00020.01
8.2.90.0000.00819.62
8.2.80.0090.00017.97
8.2.70.0030.00617.75
8.2.60.0040.00418.30
8.2.50.0030.00618.07
8.2.40.0040.00818.30
8.2.30.0000.00718.69
8.2.20.0040.00418.14
8.2.10.0070.00018.44
8.2.00.0080.00019.91
8.1.280.0170.00325.92
8.1.270.0000.00822.39
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0100.00024.26
8.1.230.0060.00619.37
8.1.220.0060.00318.16
8.1.210.0000.00818.77
8.1.200.0090.00017.60
8.1.190.0000.00817.38
8.1.180.0000.00818.10
8.1.170.0080.00018.99
8.1.160.0030.00522.32
8.1.150.0040.00418.94
8.1.140.0020.00517.78
8.1.130.0040.00418.28
8.1.120.0000.00717.83
8.1.110.0050.00317.95
8.1.100.0040.00317.91
8.1.90.0060.00417.79
8.1.80.0000.00817.77
8.1.70.0030.00317.89
8.1.60.0030.00717.92
8.1.50.0060.00317.73
8.1.40.0030.00517.78
8.1.30.0060.00318.01
8.1.20.0000.00717.92
8.1.10.0050.00318.03
8.1.00.0080.00017.95
8.0.300.0070.00018.77
8.0.290.0000.00817.00
8.0.280.0000.00718.74
8.0.270.0000.00717.78
8.0.260.0030.00317.63
8.0.250.0000.00817.44
8.0.240.0000.00717.29
8.0.230.0030.00317.44
8.0.220.0070.00017.16
8.0.210.0030.00317.23
8.0.200.0030.00317.40
8.0.190.0000.00817.42
8.0.180.0000.00717.28
8.0.170.0080.00017.27
8.0.160.0070.00017.21
8.0.150.0000.00717.29
8.0.140.0070.00017.28
8.0.130.0030.00313.82
8.0.120.0040.00417.30
8.0.110.0040.00417.13
8.0.100.0080.00017.32
8.0.90.0040.00417.27
8.0.80.0030.01217.21
8.0.70.0030.00617.26
8.0.60.0080.00017.16
8.0.50.0040.00417.16
8.0.30.0150.00717.63
8.0.20.0090.00917.43
8.0.10.0000.00717.20
8.0.00.0080.01217.03
7.4.330.0050.00015.41
7.4.320.0000.00716.83
7.4.300.0030.00316.90
7.4.290.0000.00716.69
7.4.280.0000.00716.97
7.4.270.0050.00216.98
7.4.260.0000.00816.95
7.4.250.0020.00516.95
7.4.240.0020.00516.98
7.4.230.0000.00716.96
7.4.220.0070.01017.11
7.4.210.0120.00916.93
7.4.200.0000.00716.86
7.4.160.0080.01316.88
7.4.150.0000.01917.40
7.4.140.0070.01117.86
7.4.130.0120.00416.89
7.4.120.0080.01016.88
7.4.110.0100.01016.95
7.4.100.0140.00416.95
7.4.90.0130.01016.84
7.4.80.0100.01419.39
7.4.70.0060.01016.84
7.4.60.0120.00317.12
7.4.50.0000.00916.97
7.4.40.0090.00916.79
7.4.30.0070.01016.89
7.4.00.0070.01015.29
7.3.330.0050.00013.48
7.3.320.0060.00013.48
7.3.310.0000.00716.74
7.3.300.0030.00316.46
7.3.290.0080.01216.72
7.3.280.0080.00816.64
7.3.270.0130.00617.40
7.3.260.0120.00617.14
7.3.250.0160.00316.79
7.3.240.0140.00416.87
7.3.230.0100.00716.57
7.3.210.0130.00416.81
7.3.200.0130.00419.39
7.3.190.0110.01216.93
7.3.180.0130.00316.67
7.3.170.0090.01516.70
7.3.160.0110.00716.86
7.3.120.0110.00315.07
7.3.10.0070.01216.49
7.3.00.0050.01216.86
7.2.330.0080.00817.04
7.2.320.0060.01217.09
7.2.310.0070.01017.02
7.2.300.0070.01116.86
7.2.290.0220.00316.90
7.2.130.0110.00717.09
7.2.120.0080.00917.08
7.2.110.0140.00516.94
7.2.100.0090.01016.84
7.2.90.0110.00917.01
7.2.80.0090.00716.96
7.2.70.0140.00617.06
7.2.60.0090.00816.84
7.2.50.0080.00816.81
7.2.40.0110.00616.94
7.2.30.0080.00816.92
7.2.20.0070.01116.99
7.2.10.0080.00816.73
7.2.00.0130.00516.97
7.1.250.0120.00615.79
7.1.70.0000.00717.42
7.1.60.0120.01219.70
7.1.50.0130.00617.08
7.1.00.0100.07022.54
7.0.200.0040.00417.05
7.0.140.0000.07722.39
7.0.60.0070.08720.21
7.0.50.0030.05018.05
7.0.40.0030.04320.12
7.0.30.0330.08020.36
7.0.20.0100.05720.31
7.0.10.0070.08720.39
7.0.00.0000.04320.24
5.6.280.0030.07321.03
5.6.210.0070.07320.75
5.6.200.0100.08318.34
5.6.190.0000.09720.91
5.6.180.3400.04320.88
5.6.170.0100.04720.59
5.6.160.0070.05020.85
5.6.150.0100.06318.39
5.6.140.0130.07318.36
5.6.130.0130.06718.42
5.6.120.0070.04321.21
5.6.110.0070.07321.20
5.6.100.0170.06721.11
5.6.90.0030.07721.29
5.6.80.0170.07020.59
5.6.70.3470.03320.68
5.5.350.0070.08020.61
5.5.340.0000.05718.14
5.5.330.0100.04320.42
5.5.320.0200.04020.36
5.5.310.0370.06720.46
5.5.300.0030.05718.13
5.5.290.0070.08718.19
5.5.280.0070.03721.09
5.5.270.0070.05720.94
5.5.260.0030.08721.07
5.5.250.0130.06720.73
5.5.240.0370.06320.34
5.4.450.0470.03729.30
5.4.440.0300.05029.29
5.4.430.0270.04326.63
5.4.420.0500.04724.75
5.4.410.0270.05022.93
5.4.400.0470.03721.68
5.4.390.0300.04321.57
5.4.380.0200.05018.82
5.4.370.0070.05718.87
5.4.360.0170.05018.63
5.4.350.0200.04718.89
5.4.340.0170.05018.78
5.4.320.0040.04312.70
5.4.310.0090.05312.70
5.4.300.0120.04112.70
5.4.290.0060.04212.70
5.4.280.0060.03512.60
5.4.270.0050.03612.59
5.4.260.0060.03812.59
5.4.250.0040.03912.59
5.4.240.0020.04012.59
5.4.230.0050.03912.59
5.4.220.0090.03312.59
5.4.210.0060.03712.59
5.4.200.0070.04212.59
5.4.190.0030.04312.59
5.4.180.0060.03812.59
5.4.170.0050.03812.59
5.4.160.0040.04212.59
5.4.150.0030.03912.59
5.4.140.0090.04712.27
5.4.130.0050.03712.27
5.4.120.0060.03712.22
5.4.110.0090.03312.22
5.4.100.0020.03912.22
5.4.90.0080.03612.22
5.4.80.0060.03712.22
5.4.70.0040.03612.21
5.4.60.0070.03912.21
5.4.50.0060.03512.20
5.4.40.0020.03812.20
5.4.30.0110.03812.18
5.4.20.0070.04612.18
5.4.10.0030.03712.19
5.4.00.0070.03411.68
5.3.290.0050.03812.80
5.3.280.0080.03412.71
5.3.270.0100.03712.73
5.3.260.0080.03812.72
5.3.250.0080.03512.72
5.3.240.0060.03812.72
5.3.230.0060.03712.71
5.3.220.0050.03812.68
5.3.210.0050.04012.68
5.3.200.0080.04212.68
5.3.190.0050.03812.68
5.3.180.0080.03412.67
5.3.170.0070.03712.67
5.3.160.0040.03912.67
5.3.150.0080.03512.67
5.3.140.0030.04012.66
5.3.130.0040.04112.66
5.3.120.0050.04012.65
5.3.110.0090.03812.66
5.3.100.0070.04112.12
5.3.90.0110.03412.08
5.3.80.0080.03412.07
5.3.70.0070.03912.08
5.3.60.0070.04012.06
5.3.50.0110.03612.00
5.3.40.0060.03912.00
5.3.30.0050.03611.95
5.3.20.0050.03611.73
5.3.10.0050.03711.70
5.3.00.0060.03611.69
5.2.170.0060.0349.18
5.2.160.0060.0309.18
5.2.150.0060.0299.18
5.2.140.0040.0319.18
5.2.130.0060.0279.14
5.2.120.0030.0359.14
5.2.110.0030.0309.15
5.2.100.0060.0269.14
5.2.90.0050.0289.14
5.2.80.0090.0319.14
5.2.70.0040.0319.14
5.2.60.0050.0379.09
5.2.50.0030.0329.06
5.2.40.0090.0249.04
5.2.30.0060.0289.01
5.2.20.0050.0289.01
5.2.10.0040.0298.93
5.2.00.0070.0298.79
5.1.60.0050.0238.07
5.1.50.0040.0248.07
5.1.40.0040.0258.04
5.1.30.0060.0278.40
5.1.20.0060.0278.42
5.1.10.0080.0258.15
5.1.00.0020.0308.15
5.0.50.0030.0256.63
5.0.40.0060.0236.48
5.0.30.0040.0306.29
5.0.20.0030.0196.27
5.0.10.0070.0266.24
5.0.00.0030.0346.23
4.4.90.0020.0164.77
4.4.80.0020.0204.75
4.4.70.0040.0254.75
4.4.60.0070.0184.75
4.4.50.0040.0154.77
4.4.40.0030.0284.71
4.4.30.0040.0134.76
4.4.20.0020.0184.84
4.4.10.0030.0154.85
4.4.00.0030.0294.76
4.3.110.0010.0174.66
4.3.100.0010.0254.66
4.3.90.0030.0144.63
4.3.80.0040.0254.58
4.3.70.0060.0164.63
4.3.60.0010.0204.63
4.3.50.0030.0204.63
4.3.40.0040.0274.54
4.3.30.0050.0183.29
4.3.20.0030.0153.27
4.3.10.0030.0183.22
4.3.00.0100.01321.56

preferences:
47.24 ms | 401 KiB | 5 Q