3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Ch5ild1' /> <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.00316.87
8.3.50.0140.00323.12
8.3.40.0120.00319.17
8.3.30.0170.00019.42
8.3.20.0050.00320.65
8.3.10.0080.00022.23
8.3.00.0050.00317.88
8.2.180.0150.00016.75
8.2.170.0120.00422.96
8.2.160.0040.01122.63
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0000.00926.16
8.2.120.0080.00021.38
8.2.110.0100.00022.61
8.2.100.0040.00718.16
8.2.90.0030.00519.59
8.2.80.0050.00318.00
8.2.70.0040.00717.74
8.2.60.0000.00818.18
8.2.50.0060.00318.07
8.2.40.0030.00618.59
8.2.30.0070.00018.51
8.2.20.0000.00818.18
8.2.10.0040.00418.65
8.2.00.0040.00418.10
8.1.280.0070.01025.92
8.1.270.0000.00824.29
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00024.36
8.1.230.0040.00819.34
8.1.220.0000.00918.16
8.1.210.0040.00418.77
8.1.200.0000.00917.60
8.1.190.0030.00617.48
8.1.180.0060.00318.10
8.1.170.0080.00019.04
8.1.160.0040.00422.46
8.1.150.0060.00319.27
8.1.140.0000.00717.75
8.1.130.0030.00318.23
8.1.120.0040.00417.71
8.1.110.0000.00817.89
8.1.100.0070.00017.66
8.1.90.0040.00417.89
8.1.80.0070.00017.92
8.1.70.0000.00717.82
8.1.60.0090.00017.90
8.1.50.0050.00317.89
8.1.40.0030.00617.75
8.1.30.0050.00318.09
8.1.20.0000.00717.84
8.1.10.0040.00417.79
8.1.00.0110.00017.77
8.0.300.0040.00418.77
8.0.290.0060.00317.13
8.0.280.0000.00718.79
8.0.270.0030.00617.59
8.0.260.0070.00017.61
8.0.250.0030.00317.32
8.0.240.0100.00017.31
8.0.230.0070.00017.22
8.0.220.0000.00717.20
8.0.210.0000.00817.32
8.0.200.0000.00817.29
8.0.190.0000.00717.42
8.0.180.0000.00717.37
8.0.170.0070.00017.25
8.0.160.0040.00417.37
8.0.150.0000.00717.30
8.0.140.0000.01017.29
8.0.130.0000.00613.73
8.0.120.0040.00417.09
8.0.110.0000.00817.27
8.0.100.0040.00417.09
8.0.90.0070.00017.18
8.0.80.0060.01217.23
8.0.70.0030.00517.14
8.0.60.0000.00717.02
8.0.50.0030.00517.25
8.0.30.0100.01017.59
8.0.20.0130.00717.56
8.0.10.0030.00517.25
8.0.00.0080.01417.20
7.4.330.0000.00515.43
7.4.320.0060.00016.81
7.4.300.0030.00317.01
7.4.290.0070.00016.95
7.4.280.0040.00416.79
7.4.270.0070.00016.76
7.4.260.0050.00217.05
7.4.250.0080.00016.77
7.4.240.0060.00116.88
7.4.230.0070.00016.89
7.4.220.0100.01417.03
7.4.210.0040.01017.02
7.4.200.0070.00017.02
7.4.160.0060.01016.77
7.4.150.0120.00617.40
7.4.140.0130.01117.86
7.4.130.0120.00616.91
7.4.120.0080.00817.03
7.4.110.0120.00916.82
7.4.100.0060.01816.84
7.4.90.0100.00716.96
7.4.80.0070.01319.39
7.4.70.0000.01716.82
7.4.60.0100.01016.97
7.4.50.0070.00016.80
7.4.40.0100.00716.98
7.4.30.0110.00517.08
7.4.00.0030.00615.03
7.3.330.0000.00613.38
7.3.320.0050.00013.48
7.3.310.0030.00316.61
7.3.300.0030.00316.65
7.3.290.0100.00316.61
7.3.280.0090.00816.69
7.3.270.0110.00617.40
7.3.260.0070.01016.81
7.3.240.0080.00816.86
7.3.230.0070.01016.84
7.3.210.0150.00616.66
7.3.200.0070.01619.39
7.3.190.0140.00716.88
7.3.180.0070.01016.83
7.3.170.0090.00916.62
7.3.160.0150.00316.68
7.2.330.0070.01117.10
7.2.320.0140.00317.13
7.2.310.0130.00316.84
7.2.300.0120.01216.96
7.2.290.0090.00817.01
7.2.60.0120.00917.14
7.2.00.0040.01219.54
7.1.200.0030.01415.92
7.1.100.0030.00818.18
7.1.70.0080.00317.44
7.1.60.0190.00619.40
7.1.50.0070.00417.07
7.1.00.0030.07722.70
7.0.200.0040.00416.95
7.0.140.0030.07322.22
7.0.60.0130.08020.05
7.0.50.0070.07018.07
7.0.40.0070.08020.33
7.0.30.0500.04020.24
7.0.20.0130.05320.45
7.0.10.0100.08320.48
7.0.00.0070.07320.38
5.6.280.0070.07321.16
5.6.210.0100.08320.80
5.6.200.0100.04318.41
5.6.190.0030.06020.92
5.6.180.4130.04020.89
5.6.170.0300.07720.62
5.6.160.0070.08720.69
5.6.150.0070.06718.32
5.6.140.0130.07018.37
5.6.130.0000.04318.36
5.6.120.0100.08721.26
5.6.110.0100.06721.14
5.6.100.0100.07721.11
5.6.90.0170.06721.15
5.6.80.0100.06320.66
5.6.70.3330.04320.70
5.5.350.0070.06020.69
5.5.340.0000.06718.17
5.5.330.0070.04720.34
5.5.320.0270.08020.43
5.5.310.0230.08320.53
5.5.300.0000.07718.16
5.5.290.0000.09018.21
5.5.280.0100.06720.98
5.5.270.0100.07721.07
5.5.260.0030.08721.07
5.5.250.0070.04020.77
5.5.240.0300.07320.51
5.4.450.0070.08319.73
5.4.440.0200.06019.48
5.4.430.0170.05019.40
5.4.420.0030.06319.39
5.4.410.0070.06019.56
5.4.400.0100.07319.27
5.4.390.0130.05319.05
5.4.380.0300.08318.80
5.4.370.0530.06018.91
5.4.360.0870.04318.93
5.4.350.0270.06718.93
5.4.340.0270.05718.67
5.4.320.0110.03812.70
5.4.310.0030.04112.70
5.4.300.0100.03712.70
5.4.290.0060.04212.70
5.4.280.0070.03512.60
5.4.270.0080.03412.60
5.4.260.0090.03912.60
5.4.250.0070.03912.59
5.4.240.0070.03512.60
5.4.230.0070.03712.59
5.4.220.0060.03612.59
5.4.210.0070.03712.59
5.4.200.0050.04412.59
5.4.190.0070.03912.59
5.4.180.0100.03412.58
5.4.170.0100.03512.60
5.4.160.0040.03912.59
5.4.150.0050.03912.59
5.4.140.0090.03612.27
5.4.130.0090.03412.26
5.4.120.0050.04012.22
5.4.110.0060.03512.21
5.4.100.0050.03812.21
5.4.90.0060.03712.21
5.4.80.0040.04212.21
5.4.70.0050.03712.21
5.4.60.0060.03512.21
5.4.50.0070.03512.20
5.4.40.0060.03512.20
5.4.30.0050.03712.19
5.4.20.0030.04012.19
5.4.10.0080.03212.19
5.4.00.0050.03611.68
5.3.290.0070.03812.80
5.3.280.0080.03612.71
5.3.270.0040.04112.72
5.3.260.0070.04212.72
5.3.250.0090.03512.72
5.3.240.0060.03912.72
5.3.230.0060.03912.71
5.3.220.0060.03812.68
5.3.210.0070.04112.68
5.3.200.0060.03812.68
5.3.190.0090.03912.67
5.3.180.0080.03612.67
5.3.170.0070.03612.67
5.3.160.0050.03712.68
5.3.150.0080.03712.67
5.3.140.0100.03312.66
5.3.130.0040.04012.66
5.3.120.0090.03712.66
5.3.110.0040.04112.66
5.3.100.0080.03612.12
5.3.90.0080.03612.08
5.3.80.0060.03812.07
5.3.70.0040.04012.07
5.3.60.0050.03612.06
5.3.50.0050.03612.00
5.3.40.0050.03912.00
5.3.30.0040.03811.95
5.3.20.0060.03711.73
5.3.10.0050.03711.70
5.3.00.0040.03911.69
5.2.170.0020.0339.18
5.2.160.0050.0299.19
5.2.150.0040.0319.19
5.2.140.0050.0309.18
5.2.130.0070.0319.14
5.2.120.0060.0309.14
5.2.110.0060.0309.15
5.2.100.0060.0319.14
5.2.90.0050.0299.14
5.2.80.0020.0329.14
5.2.70.0040.0329.14
5.2.60.0040.0309.10
5.2.50.0040.0309.06
5.2.40.0050.0309.04
5.2.30.0020.0329.01
5.2.20.0080.0259.00
5.2.10.0020.0308.93
5.2.00.0030.0318.79
5.1.60.0040.0298.07
5.1.50.0020.0278.07
5.1.40.0060.0278.05
5.1.30.0050.0258.39
5.1.20.0060.0288.41
5.1.10.0050.0278.15
5.1.00.0090.0248.14
5.0.50.0050.0206.63
5.0.40.0030.0206.48
5.0.30.0020.0336.29
5.0.20.0040.0196.27
5.0.10.0030.0206.24
5.0.00.0030.0316.23
4.4.90.0040.0144.78
4.4.80.0010.0174.76
4.4.70.0020.0164.76
4.4.60.0030.0154.75
4.4.50.0030.0154.77
4.4.40.0020.0264.71
4.4.30.0020.0224.76
4.4.20.0020.0174.85
4.4.10.0030.0234.85
4.4.00.0010.0334.76
4.3.110.0030.0184.67
4.3.100.0050.0144.67
4.3.90.0040.0154.64
4.3.80.0030.0244.58
4.3.70.0040.0144.63
4.3.60.0010.0234.63
4.3.50.0060.0184.63
4.3.40.0010.0274.54
4.3.30.0010.0173.29
4.3.20.0020.0163.27
4.3.10.0020.0163.23
4.3.00.0030.0206.31

preferences:
48.86 ms | 401 KiB | 5 Q