3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1'>AAAA</child> <child name='Child2'>BBBB</child> <subparent> <child name='Child3'>CCCC</child> </subparent> </parent> <child name='Child4'>DDDD</child> </root>"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( './/child[position() = 2]') as $child) { echo $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.0000.01918.65
8.3.50.0070.00921.20
8.3.40.0110.00318.97
8.3.30.0030.01019.34
8.3.20.0060.00620.49
8.3.10.0080.00022.39
8.3.00.0030.00622.68
8.2.180.0140.00718.54
8.2.170.0070.00722.96
8.2.160.0100.00320.67
8.2.150.0050.00324.18
8.2.140.0110.00824.66
8.2.130.0100.01026.16
8.2.120.0000.00820.16
8.2.110.0030.00620.87
8.2.100.0110.00019.66
8.2.90.0060.00319.47
8.2.80.0000.00818.05
8.2.70.0000.00818.00
8.2.60.0070.00018.18
8.2.50.0060.00318.07
8.2.40.0040.00418.53
8.2.30.0040.00418.36
8.2.20.0050.00317.92
8.2.10.0050.00217.91
8.2.00.0030.00518.07
8.1.280.0150.00025.92
8.1.270.0110.00420.75
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0100.00024.16
8.1.230.0110.00019.28
8.1.220.0040.00418.04
8.1.210.0050.00318.77
8.1.200.0040.00417.25
8.1.190.0000.00817.80
8.1.180.0050.00319.07
8.1.170.0050.00318.90
8.1.160.0000.00722.45
8.1.150.0000.00718.91
8.1.140.0050.00217.80
8.1.130.0000.00718.19
8.1.120.0000.00717.88
8.1.110.0000.00817.86
8.1.100.0050.00217.82
8.1.90.0070.00017.88
8.1.80.0000.00717.68
8.1.70.0030.00317.71
8.1.60.0030.00617.77
8.1.50.0040.00417.91
8.1.40.0000.00817.94
8.1.30.0060.00318.00
8.1.20.0000.00817.86
8.1.10.0050.00317.71
8.1.00.0000.00817.86
8.0.300.0080.00018.77
8.0.290.0000.00817.30
8.0.280.0030.00318.83
8.0.270.0030.00317.51
8.0.260.0030.00317.08
8.0.250.0030.00317.13
8.0.240.0040.00417.32
8.0.230.0070.00017.34
8.0.220.0000.00717.09
8.0.210.0030.00417.10
8.0.200.0030.00317.17
8.0.190.0040.00417.16
8.0.180.0040.00417.33
8.0.170.0030.00517.32
8.0.160.0050.00317.37
8.0.150.0000.00817.24
8.0.140.0000.00717.19
8.0.130.0030.00313.64
8.0.120.0040.00417.22
8.0.110.0040.00417.01
8.0.100.0030.00317.07
8.0.90.0000.00817.27
8.0.80.0070.01017.08
8.0.70.0000.00717.12
8.0.60.0000.00717.18
8.0.50.0000.00817.07
8.0.30.0130.01017.29
8.0.20.0160.00617.58
8.0.10.0000.00817.30
8.0.00.0110.00617.08
7.4.330.0030.00315.29
7.4.320.0000.00616.97
7.4.300.0000.00716.86
7.4.290.0000.01116.82
7.4.280.0050.00216.85
7.4.270.0030.00316.89
7.4.260.0000.00717.00
7.4.250.0000.00816.88
7.4.240.0010.00616.90
7.4.230.0000.00716.74
7.4.220.0070.01317.00
7.4.210.0080.00916.91
7.4.200.0030.00316.79
7.4.190.0040.00417.03
7.4.160.0080.00816.74
7.4.150.0110.00717.40
7.4.140.0090.01117.86
7.4.130.0130.00416.79
7.4.120.0110.00716.84
7.4.110.0100.00716.81
7.4.100.0110.00716.81
7.4.90.0110.00716.75
7.4.80.0100.00819.39
7.4.70.0150.00916.71
7.4.60.0060.01216.80
7.4.50.0000.00416.89
7.4.40.0100.00722.77
7.4.30.0090.00616.85
7.4.00.0040.01115.19
7.3.330.0030.00213.17
7.3.320.0000.00613.53
7.3.310.0030.00316.72
7.3.300.0030.00316.69
7.3.290.0070.00716.67
7.3.280.0090.00916.57
7.3.270.0160.00017.40
7.3.260.0090.00916.64
7.3.250.0110.00816.76
7.3.240.0090.00916.87
7.3.230.0120.00916.56
7.3.210.0130.00316.52
7.3.200.0090.00919.39
7.3.190.0120.00916.65
7.3.180.0100.00716.63
7.3.170.0070.01316.55
7.3.160.0130.00316.75
7.3.120.0100.00715.05
7.3.10.0030.00916.53
7.3.00.0090.00616.69
7.2.330.0080.01217.17
7.2.320.0160.00017.04
7.2.310.0140.00517.18
7.2.300.0090.00617.15
7.2.290.0130.00316.98
7.2.130.0040.00417.05
7.2.120.0030.01216.98
7.2.110.0040.00717.12
7.2.100.0150.00316.91
7.2.90.0130.00616.79
7.2.80.0120.00617.23
7.2.70.0000.01216.88
7.2.60.0000.01116.90
7.2.50.0040.01217.11
7.2.40.0070.00716.85
7.2.30.0030.00717.11
7.2.20.0060.01016.89
7.2.10.0090.00416.66
7.2.00.0080.00518.31
7.1.250.0060.00615.82
7.1.100.0040.00717.86
7.1.70.0070.00017.15
7.1.60.0110.01419.82
7.1.50.0090.00917.10
7.1.00.0030.05322.60
7.0.200.0050.00517.01
7.0.140.0000.08022.23
7.0.60.0030.08320.12
7.0.50.0070.05018.07
7.0.40.0000.05720.55
7.0.30.0570.08020.32
7.0.20.0270.04020.38
7.0.10.0230.04320.23
7.0.00.0100.06320.21
5.6.280.0000.08021.25
5.6.210.0030.08020.77
5.6.200.0070.04718.34
5.6.190.0070.04320.58
5.6.180.0200.05020.81
5.6.170.0300.06720.56
5.6.160.0000.09020.55
5.6.150.0070.04718.34
5.6.140.0030.08018.38
5.6.130.0100.07718.36
5.6.120.0000.05021.25
5.6.110.0100.06321.27
5.6.100.0030.04021.11
5.6.90.0100.08321.10
5.6.80.0130.07320.55
5.6.70.0270.07320.66
5.5.350.0230.03720.66
5.5.340.0070.04318.17
5.5.330.0100.05020.38
5.5.320.0270.08320.32
5.5.310.0230.04320.39
5.5.300.0070.08018.12
5.5.290.0030.04718.22
5.5.280.0030.04021.09
5.5.270.0100.05721.08
5.5.260.0100.08321.01
5.5.250.0100.03320.62
5.5.240.0000.07320.35
5.4.450.0300.05319.76
5.4.440.0600.05319.44
5.4.430.0000.06719.71
5.4.420.1070.06019.76
5.4.410.0100.05718.88
5.4.400.0230.06718.89
5.4.390.0370.04718.93
5.4.380.0370.04718.68
5.4.370.0170.05018.78
5.4.360.0170.05018.92
5.4.350.0090.03312.24
5.4.340.0050.03812.23
5.4.320.0090.03312.72
5.4.310.0060.04612.72
5.4.300.0040.03912.72
5.4.290.0070.05612.71
5.4.280.0050.03512.61
5.4.270.0050.03712.62
5.4.260.0090.03312.62
5.4.250.0030.05719.06
5.4.240.0030.05718.79
5.4.230.0000.06018.85
5.4.220.0070.05318.85
5.4.210.0130.07019.06
5.4.200.0130.04318.94
5.4.190.0070.05318.93
5.4.180.0130.04719.06
5.4.170.0070.05319.05
5.4.160.0000.08318.83
5.4.150.0100.05718.83
5.4.140.0100.05016.68
5.4.130.0170.05716.35
5.4.120.0070.05016.35
5.4.110.0070.05016.62
5.4.100.0130.04316.52
5.4.90.0070.04716.64
5.4.80.0030.05016.55
5.4.70.0030.05316.61
5.4.60.0100.04716.58
5.4.50.0070.04316.21
5.4.40.0070.04716.67
5.4.30.0070.05016.59
5.4.20.0070.05016.50
5.4.10.0070.05716.48
5.4.00.0130.04715.83
5.3.290.0080.04112.98
5.3.280.0130.04714.83
5.3.270.0070.05314.77
5.3.260.0030.05714.51
5.3.250.0030.05314.80
5.3.240.0000.05714.68
5.3.230.0070.05314.68
5.3.220.0070.05314.78
5.3.210.0000.05714.65
5.3.200.0100.04714.60
5.3.190.0030.05314.70
5.3.180.0100.04714.80
5.3.170.0130.04314.61
5.3.160.0130.04314.61
5.3.150.0030.05314.64
5.3.140.0100.04314.68
5.3.130.0170.05314.85
5.3.120.0130.04714.63
5.3.110.0200.05314.59
5.3.100.0070.04714.08
5.3.90.0170.04013.92
5.3.80.0070.04714.17
5.3.70.0170.03714.14
5.3.60.0100.05014.09
5.3.50.0030.05314.02
5.3.40.0030.05314.04
5.3.30.0000.05313.96
5.3.20.0070.04713.82
5.3.10.0070.04713.68
5.3.00.0000.05313.71
5.2.170.0100.05011.44
5.2.160.0100.03711.36
5.2.150.0000.04311.24
5.2.140.0070.03711.32
5.2.130.0070.03711.20
5.2.120.0070.03711.26
5.2.110.0130.07711.25
5.2.100.0100.03311.20
5.2.90.0000.04311.35
5.2.80.0100.04311.25
5.2.70.0030.04311.23
5.2.60.0070.04011.21
5.2.50.0030.05711.26
5.2.40.0100.03311.08
5.2.30.0030.04311.07
5.2.20.0070.03711.05
5.2.10.0170.02711.00
5.2.00.0070.04010.92
5.1.60.0030.03010.12
5.1.50.0000.03710.09
5.1.40.0000.0379.95
5.1.30.0070.03310.43
5.1.20.0030.03710.48
5.1.10.0070.03310.40
5.1.00.0070.04310.44
5.0.50.0000.0308.69
5.0.40.0070.0238.64
5.0.30.0130.0338.19
5.0.20.0070.0238.34
5.0.10.0100.0238.28
5.0.00.0000.0438.26
4.4.90.0070.0176.73
4.4.80.0100.0176.73
4.4.70.0030.0206.73
4.4.60.0030.0206.73
4.4.50.0000.0236.73
4.4.40.0030.0336.73
4.4.30.0070.0176.73
4.4.20.0000.0236.73
4.4.10.0070.0176.73
4.4.00.0030.0306.73
4.3.110.0030.0206.73
4.3.100.0030.0206.73
4.3.90.0070.0136.73
4.3.80.0000.0476.73
4.3.70.0000.0206.73
4.3.60.0000.0236.73
4.3.50.0070.0236.73
4.3.40.0030.0336.73
4.3.30.0030.0206.73
4.3.20.0000.0236.73
4.3.10.0030.0206.73
4.3.00.0200.0136.87

preferences:
49.71 ms | 401 KiB | 5 Q