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->value(). "\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.0150.00418.52
8.3.50.0090.00921.33
8.3.40.0040.01119.12
8.3.30.0140.00019.41
8.3.20.0080.00020.41
8.3.10.0080.00022.38
8.3.00.0000.00722.66
8.2.180.0070.00718.56
8.2.170.0140.00422.96
8.2.160.0090.00620.77
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0060.01226.16
8.2.120.0040.00420.03
8.2.110.0030.00622.75
8.2.100.0070.00419.66
8.2.90.0040.00419.60
8.2.80.0030.00518.30
8.2.70.0060.00318.00
8.2.60.0060.00318.18
8.2.50.0000.00818.07
8.2.40.0030.00618.59
8.2.30.0040.00418.46
8.2.20.0000.00818.11
8.2.10.0040.00418.27
8.2.00.0040.00418.26
8.1.280.0080.00825.92
8.1.270.0070.00720.65
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00624.09
8.1.230.0060.00619.39
8.1.220.0000.00818.16
8.1.210.0000.00818.77
8.1.200.0040.00417.75
8.1.190.0040.00417.91
8.1.180.0050.00318.89
8.1.170.0080.00018.96
8.1.160.0000.00722.46
8.1.150.0070.00018.97
8.1.140.0000.00717.75
8.1.130.0000.00818.01
8.1.120.0000.00717.91
8.1.110.0050.00317.90
8.1.100.0040.00417.89
8.1.90.0070.00017.73
8.1.80.0000.00717.62
8.1.70.0030.00317.66
8.1.60.0040.00417.82
8.1.50.0000.00817.75
8.1.40.0080.00017.74
8.1.30.0000.00818.03
8.1.20.0000.00817.87
8.1.10.0050.00317.82
8.1.00.0060.00317.89
8.0.300.0070.00018.77
8.0.290.0000.00717.55
8.0.280.0000.00818.92
8.0.270.0070.00017.73
8.0.260.0000.00717.23
8.0.250.0000.00717.42
8.0.240.0050.00317.30
8.0.230.0000.00817.46
8.0.220.0030.00317.28
8.0.210.0000.00717.20
8.0.200.0030.00317.47
8.0.190.0080.00017.23
8.0.180.0080.00017.18
8.0.170.0040.00417.34
8.0.160.0040.00417.20
8.0.150.0040.00417.05
8.0.140.0040.00417.34
8.0.130.0060.00013.81
8.0.120.0050.00317.33
8.0.110.0000.00817.26
8.0.100.0040.00417.43
8.0.90.0050.00317.19
8.0.80.0060.01017.27
8.0.70.0040.00417.20
8.0.60.0040.00417.21
8.0.50.0040.00417.20
8.0.30.0130.01017.37
8.0.20.0120.00917.55
8.0.10.0050.00217.31
8.0.00.0110.01217.09
7.4.330.0000.00715.42
7.4.320.0000.00716.88
7.4.300.0000.00716.96
7.4.290.0040.00416.79
7.4.280.0040.00417.00
7.4.270.0070.00016.77
7.4.260.0070.00016.98
7.4.250.0000.00716.86
7.4.240.0020.00616.93
7.4.230.0030.00316.99
7.4.220.0110.00716.78
7.4.210.0050.01216.83
7.4.200.0040.00416.98
7.4.190.0000.00717.12
7.4.160.0060.00916.84
7.4.150.0060.01217.40
7.4.140.0110.00717.86
7.4.130.0150.00216.77
7.4.120.0080.00816.90
7.4.110.0100.01016.92
7.4.100.0130.00916.93
7.4.90.0100.00716.94
7.4.80.0060.01119.39
7.4.70.0070.01116.79
7.4.60.0000.01616.92
7.4.50.0060.00316.97
7.4.40.0060.00922.77
7.4.30.0030.01317.00
7.4.00.0080.00314.90
7.3.330.0000.00613.58
7.3.320.0050.00013.25
7.3.310.0070.00016.54
7.3.300.0070.00016.52
7.3.290.0030.01716.50
7.3.280.0080.00716.54
7.3.270.0060.01317.40
7.3.260.0070.01116.79
7.3.250.0150.00616.76
7.3.240.0070.01016.58
7.3.230.0100.01516.63
7.3.210.0040.01516.80
7.3.200.0130.01019.39
7.3.190.0130.00616.73
7.3.180.0030.01616.68
7.3.170.0070.01316.86
7.3.160.0030.01316.63
7.3.120.0060.00615.11
7.2.330.0070.01017.10
7.2.320.0070.01016.94
7.2.310.0120.00616.86
7.2.300.0100.00716.86
7.2.290.0070.01016.98
7.2.60.0030.00917.07
7.2.00.0080.00819.36
7.1.200.0090.00015.96
7.1.100.0040.00818.34
7.1.70.0030.00517.11
7.1.60.0130.01319.82
7.1.50.0060.01216.89
7.1.00.0030.07022.66
7.0.200.0000.01017.07
7.0.140.0000.07722.28
7.0.60.0000.04320.19
7.0.50.0130.07318.04
7.0.40.0000.05020.15
7.0.30.0570.05320.38
7.0.20.0230.05020.36
7.0.10.0100.05020.32
7.0.00.0030.09020.21
5.6.280.0000.07321.12
5.6.210.0400.04720.68
5.6.200.0170.07718.34
5.6.190.0070.05720.63
5.6.180.0230.07020.85
5.6.170.0230.05020.75
5.6.160.0030.05320.66
5.6.150.0070.05718.29
5.6.140.0030.05018.36
5.6.130.0000.04318.25
5.6.120.0130.08021.10
5.6.110.0170.07021.27
5.6.100.0070.08021.29
5.6.90.0130.05721.25
5.6.80.0070.06020.55
5.6.70.4370.03020.64
5.5.350.0100.08320.46
5.5.340.0170.04718.16
5.5.330.0030.05720.68
5.5.320.0130.04720.39
5.5.310.0330.03320.56
5.5.300.0100.07718.07
5.5.290.0100.07318.13
5.5.280.0170.07021.13
5.5.270.0130.07020.94
5.5.260.0030.08321.00
5.5.250.0130.05320.80
5.5.240.0300.07020.29
5.4.450.0200.05019.70
5.4.440.0070.06019.38
5.4.430.0230.04719.83
5.4.420.0430.05319.44
5.4.410.0770.05319.71
5.4.400.0330.05018.92
5.4.390.0370.07018.94
5.4.380.0270.05718.91
5.4.370.0130.05318.62
5.4.360.0170.07018.84
5.4.350.0070.06512.25
5.4.340.0120.06212.24
5.4.320.0050.03812.72
5.4.310.0030.04012.71
5.4.300.0020.04712.72
5.4.290.0030.04812.72
5.4.280.0060.03712.62
5.4.270.0080.05112.62
5.4.260.0090.04412.62
5.4.250.0170.06718.97
5.4.240.0100.05019.07
5.4.230.0200.04019.00
5.4.220.0100.07318.94
5.4.210.0270.05718.98
5.4.200.0100.05718.93
5.4.190.0100.06018.93
5.4.180.0100.06318.95
5.4.170.0200.04319.08
5.4.160.0070.05718.98
5.4.150.0070.06019.09
5.4.140.0100.07016.40
5.4.130.0070.04716.76
5.4.120.0130.06316.48
5.4.110.0070.05016.68
5.4.100.0100.04316.43
5.4.90.0070.06316.32
5.4.80.0100.04716.39
5.4.70.0070.06716.30
5.4.60.0030.05016.62
5.4.50.0030.05016.34
5.4.40.0000.05316.48
5.4.30.0030.06016.47
5.4.20.0100.04716.62
5.4.10.0030.05716.57
5.4.00.0070.04715.91
5.3.290.0040.04212.98
5.3.280.0130.04714.66
5.3.270.0070.05314.66
5.3.260.0070.05714.65
5.3.250.0030.05314.84
5.3.240.0130.07014.69
5.3.230.0070.05314.75
5.3.220.0070.06714.60
5.3.210.0130.05314.86
5.3.200.0130.05714.73
5.3.190.0070.05014.73
5.3.180.0070.05014.69
5.3.170.0130.04314.61
5.3.160.0030.08014.69
5.3.150.0000.05714.80
5.3.140.0030.07314.77
5.3.130.0000.06014.67
5.3.120.0070.05314.79
5.3.110.0100.05314.68
5.3.100.0100.06314.08
5.3.90.0100.04713.93
5.3.80.0170.05014.07
5.3.70.0100.04714.16
5.3.60.0070.04714.14
5.3.50.0030.05014.04
5.3.40.0070.06014.18
5.3.30.0000.06313.83
5.3.20.0030.05013.75
5.3.10.0070.05713.56
5.3.00.0070.07313.80
5.2.170.0000.04711.11
5.2.160.0030.04011.25
5.2.150.0100.03711.21
5.2.140.0030.04011.30
5.2.130.0130.03311.21
5.2.120.0100.03311.31
5.2.110.0170.03011.07
5.2.100.0030.06011.20
5.2.90.0200.03011.16
5.2.80.0100.03711.21
5.2.70.0100.05311.33
5.2.60.0030.05711.24
5.2.50.0100.03711.12
5.2.40.0070.03711.10
5.2.30.0130.05311.13
5.2.20.0000.04311.02
5.2.10.0030.04011.16
5.2.00.0000.04311.07
5.1.60.0030.03310.09
5.1.50.0070.03010.12
5.1.40.0000.03710.12
5.1.30.0000.04010.56
5.1.20.0030.03310.57
5.1.10.0070.03310.18
5.1.00.0170.03310.26
5.0.50.0000.0338.66
5.0.40.0030.0278.75
5.0.30.0100.0378.45
5.0.20.0030.0338.36
5.0.10.0070.0238.37
5.0.00.0030.0408.45
4.4.90.0000.0236.73
4.4.80.0000.0236.73
4.4.70.0030.0206.73
4.4.60.0000.0336.73
4.4.50.0000.0306.73
4.4.40.0030.0336.73
4.4.30.0000.0236.73
4.4.20.0030.0206.73
4.4.10.0000.0236.73
4.4.00.0030.0336.73
4.3.110.0030.0206.73
4.3.100.0000.0206.73
4.3.90.0070.0176.73
4.3.80.0000.0336.73
4.3.70.0070.0136.73
4.3.60.0030.0176.73
4.3.50.0070.0176.73
4.3.40.0000.0336.73
4.3.30.0000.0236.73
4.3.20.0070.0176.73
4.3.10.0030.0206.73
4.3.00.0070.0236.93

preferences:
35.93 ms | 400 KiB | 5 Q