3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent> <child name='Child3' /> </subparent> </parent> <parent> <child name='Child1' /> <child name='Child2' /> </parent> </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.0170.00318.67
8.3.50.0070.00922.17
8.3.40.0110.00419.14
8.3.30.0110.00719.01
8.3.20.0080.00018.89
8.3.10.0080.00021.37
8.3.00.0050.00322.14
8.2.180.0110.00417.25
8.2.170.0090.00922.96
8.2.160.0100.00320.77
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.63
8.2.110.0100.00020.81
8.2.100.0090.00318.02
8.2.90.0030.00519.55
8.2.80.0080.00018.41
8.2.70.0040.00417.88
8.2.60.0000.00818.30
8.2.50.0100.00018.07
8.2.40.0030.00518.59
8.2.30.0050.00321.58
8.2.20.0040.00418.18
8.2.10.0060.00318.18
8.2.00.0000.00718.06
8.1.280.0170.00625.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0150.00422.84
8.1.230.0070.00421.36
8.1.220.0060.00318.77
8.1.210.0080.00019.26
8.1.200.0090.00017.60
8.1.190.0080.00017.89
8.1.180.0000.00818.10
8.1.170.0080.00019.03
8.1.160.0050.00319.29
8.1.150.0000.00719.15
8.1.140.0050.00317.93
8.1.130.0030.00717.81
8.1.120.0060.00317.71
8.1.110.0040.00417.66
8.1.100.0080.00017.70
8.1.90.0050.00317.65
8.1.80.0000.00717.95
8.1.70.0030.00317.87
8.1.60.0030.00618.07
8.1.50.0000.00717.83
8.1.40.0000.00817.72
8.1.30.0000.00717.87
8.1.20.0060.00317.97
8.1.10.0000.00718.01
8.1.00.0000.00717.72
8.0.300.0030.00620.26
8.0.290.0040.00417.50
8.0.280.0040.00418.80
8.0.270.0020.00517.62
8.0.260.0000.00617.20
8.0.250.0040.00417.41
8.0.240.0030.00717.42
8.0.230.0000.00717.19
8.0.220.0070.00017.30
8.0.210.0030.00317.11
8.0.200.0030.00317.37
8.0.190.0030.00317.38
8.0.180.0030.00517.30
8.0.170.0050.00317.36
8.0.160.0000.00717.06
8.0.150.0040.00417.28
8.0.140.0050.00217.16
8.0.130.0050.00013.58
8.0.120.0000.00817.16
8.0.110.0050.00217.15
8.0.100.0000.00717.21
8.0.90.0000.00717.31
8.0.80.0060.00917.23
8.0.70.0050.00317.20
8.0.60.0030.00517.34
8.0.50.0000.00717.26
8.0.30.0080.01317.33
8.0.20.0060.01517.52
8.0.10.0040.00417.44
8.0.00.0140.01017.09
7.4.330.0030.00315.06
7.4.320.0040.00417.02
7.4.300.0000.00616.78
7.4.290.0000.00717.00
7.4.280.0030.00316.94
7.4.270.0000.00717.06
7.4.260.0030.00313.68
7.4.250.0040.00416.85
7.4.240.0000.00716.96
7.4.230.0030.00316.92
7.4.220.0100.01016.90
7.4.210.0080.00816.97
7.4.200.0050.00316.70
7.4.190.0040.00416.86
7.4.160.0100.00717.07
7.4.150.0120.00617.40
7.4.140.0050.01717.86
7.4.130.0120.00516.84
7.4.120.0110.01016.89
7.4.110.0100.00916.87
7.4.100.0130.00416.84
7.4.90.0090.00916.82
7.4.80.0030.01319.39
7.4.70.0050.01016.80
7.4.60.0060.01216.81
7.4.50.0060.00316.98
7.4.40.0040.01122.52
7.4.30.0130.00316.76
7.4.00.0080.00815.16
7.3.330.0030.00313.41
7.3.320.0030.00313.45
7.3.310.0040.00416.66
7.3.300.0000.00716.68
7.3.290.0040.01116.76
7.3.280.0080.01116.67
7.3.270.0110.00817.40
7.3.260.0090.01318.24
7.3.250.0130.00716.78
7.3.240.0120.00616.93
7.3.230.0120.00916.88
7.3.210.0120.00616.65
7.3.200.0120.00619.39
7.3.190.0160.00416.71
7.3.180.0090.00616.68
7.3.170.0130.00316.87
7.3.160.0070.01016.73
7.3.120.0050.01114.99
7.3.110.0070.00714.96
7.3.100.0000.01514.87
7.3.90.0090.00614.89
7.3.80.0070.00714.74
7.3.70.0000.01414.75
7.3.60.0070.00714.77
7.3.50.0080.00315.07
7.3.40.0090.00614.98
7.3.30.0090.00614.99
7.3.20.0090.00316.62
7.3.10.0100.00316.73
7.3.00.0040.00816.77
7.2.330.0100.01317.10
7.2.320.0100.01317.14
7.2.310.0100.01316.95
7.2.300.0000.02317.07
7.2.290.0130.00616.88
7.2.250.0030.01815.24
7.2.240.0100.01014.92
7.2.230.0060.01215.36
7.2.220.0030.00915.51
7.2.210.0060.00615.34
7.2.200.0000.01415.22
7.2.190.0110.00615.09
7.2.180.0070.00715.05
7.2.170.0100.00715.27
7.2.00.0040.01119.58
7.1.330.0070.00715.91
7.1.320.0090.00915.96
7.1.310.0030.01215.93
7.1.300.0030.01015.68
7.1.290.0090.00616.02
7.1.280.0070.00716.15
7.1.270.0120.00015.79
7.1.260.0070.01015.86
7.1.200.0040.00416.05
7.1.100.0070.00718.52
7.1.70.0000.00717.42
7.1.60.0100.01319.40
7.1.50.0130.00917.11
7.1.00.0030.06322.78
7.0.200.0100.00316.84
7.0.140.0000.07322.19
7.0.70.0070.03721.87
7.0.60.0070.08022.07
7.0.50.0100.07022.18
7.0.40.0100.07720.34
7.0.30.0100.03720.18
7.0.20.0070.04020.26
7.0.10.0000.04320.21
7.0.00.0030.05720.29
5.6.280.0000.07721.24
5.6.220.0100.04320.85
5.6.210.0100.07720.64
5.6.200.0030.07721.31
5.6.190.0070.07721.29
5.6.180.0070.07321.29
5.6.170.0030.07721.11
5.6.160.0070.08021.14
5.6.150.0000.04321.30
5.6.140.0030.04021.20
5.6.130.0030.04321.21
5.6.120.0000.04721.30
5.6.110.0030.08321.33
5.6.100.0070.06021.21
5.6.90.0000.04721.26
5.6.80.0030.05720.58
5.6.70.0030.07320.63
5.6.60.0000.07720.54
5.6.50.0000.07320.64
5.6.40.0030.05720.61
5.6.30.0000.08320.71
5.6.20.0030.07720.49
5.6.10.0070.06720.52
5.6.00.0000.06020.41
5.5.360.0130.08020.66
5.5.350.0100.05720.56
5.5.340.0030.06721.11
5.5.330.0070.08021.00
5.5.320.0030.08321.00
5.5.310.0100.07021.04
5.5.300.0000.07321.00
5.5.290.0030.08320.94
5.5.280.0030.08020.97
5.5.270.0000.05021.00
5.5.260.0070.07320.93
5.5.250.0030.04320.77
5.5.240.0070.07320.31
5.5.230.0070.07020.45
5.5.220.0000.08020.38
5.5.210.0000.05320.40
5.5.200.0070.07020.46
5.5.190.0070.06720.39
5.5.180.0000.08720.27
5.5.160.0000.08020.33
5.5.150.0000.05720.44
5.5.140.0070.07720.41
5.5.130.0000.08020.30
5.5.120.0000.05020.30
5.5.110.0070.07320.41
5.5.100.0030.03720.34
5.5.90.0100.06020.25
5.5.80.0100.06720.28
5.5.70.0100.06320.14
5.5.60.0030.04020.14
5.5.50.0000.07720.23
5.5.40.0030.04720.27
5.5.30.0000.04020.20
5.5.20.0070.05720.20
5.5.10.0000.04320.27
5.5.00.0030.04020.25
5.4.450.0030.07019.42
5.4.440.0030.03719.57
5.4.430.0030.03719.61
5.4.420.0000.04319.41
5.4.410.0000.06319.48
5.4.400.0000.04719.02
5.4.390.0070.07719.18
5.4.380.0030.07019.09
5.4.370.0000.04719.26
5.4.360.0070.07319.27
5.4.350.0000.07719.26
5.4.340.0030.04719.25
5.4.320.0000.05719.39
5.4.310.0030.07319.29
5.4.300.0100.06019.29
5.4.290.0030.04319.23
5.4.280.0070.03319.39
5.4.270.0000.08319.18
5.4.260.0000.04019.23
5.4.250.0070.06719.24
5.4.240.0030.07019.27
5.4.230.0030.07019.23
5.4.220.0070.03719.00
5.4.210.0000.03719.43
5.4.200.0130.07019.41
5.4.190.0030.03319.18
5.4.180.0000.03719.18
5.4.170.0000.04019.27
5.4.160.0030.05019.16
5.4.150.0000.04019.28
5.4.140.0030.03316.38
5.4.130.0030.03316.52
5.4.120.0000.03716.55
5.4.110.0000.03016.45
5.4.100.0070.03316.46
5.4.90.0030.02716.36
5.4.80.0070.03316.61
5.4.70.0030.06716.44
5.4.60.0000.07316.41
5.4.50.0000.05016.42
5.4.40.0000.04016.50
5.4.30.0030.06316.58
5.4.20.0000.04716.58
5.4.10.0000.04016.42
5.4.00.0030.03315.91
5.3.290.0030.08314.50
5.3.280.0070.03314.58
5.3.270.0000.04714.48
5.3.260.0000.04014.61
5.3.250.0030.03314.58
5.3.240.0070.02714.60
5.3.230.0030.04714.59
5.3.220.0070.06314.43
5.3.210.0030.03014.53
5.3.200.0030.05714.52
5.3.190.0030.03314.55
5.3.180.0000.03014.55
5.3.170.0000.03714.43
5.3.160.0030.04714.56
5.3.150.0030.08014.56
5.3.140.0100.05014.57
5.3.130.0030.04314.40
5.3.120.0000.06314.54
5.3.110.0100.03014.54
5.3.100.0070.03013.98
5.3.90.0000.03713.98
5.3.80.0000.04314.01
5.3.70.0000.03713.97
5.3.60.0030.03713.76
5.3.50.0070.03013.91
5.3.40.0030.03313.95
5.3.30.0030.03313.76
5.3.20.0000.03713.70
5.3.10.0000.03713.42
5.3.00.0000.03713.65
5.2.170.0030.02712.15
5.2.160.0030.02712.15
5.2.150.0070.02312.15
5.2.140.0000.03012.15
5.2.130.0000.02712.15
5.2.120.0000.02712.15
5.2.110.0000.03012.15
5.2.100.0070.02312.15
5.2.90.0030.02712.15
5.2.80.0000.03012.15
5.2.70.0000.03012.15
5.2.60.0000.02312.15
5.2.50.0000.02312.15
5.2.40.0000.02312.15
5.2.30.0000.02712.15
5.2.20.0000.02312.15
5.2.10.0000.02712.15
5.2.00.0000.02712.15
5.1.60.0030.02312.15
5.1.50.0030.02012.15
5.1.40.0000.02312.15
5.1.30.0030.01712.15
5.1.20.0000.02712.15
5.1.10.0000.02312.15
5.1.00.0000.02712.15
5.0.50.0030.01712.15
5.0.40.0000.01712.15
5.0.30.0000.02712.15
5.0.20.0000.03312.15
5.0.10.0000.02012.15
5.0.00.0000.03012.15
4.4.90.0030.01312.15
4.4.80.0030.01012.15
4.4.70.0000.01312.15
4.4.60.0030.01312.15
4.4.50.0000.01312.15
4.4.40.0000.02312.15
4.4.30.0000.01312.15
4.4.20.0030.01712.15
4.4.10.0000.01312.15
4.4.00.0000.02012.15
4.3.110.0000.01312.15
4.3.100.0000.01012.15
4.3.90.0000.02012.15
4.3.80.0000.03312.15
4.3.70.0000.01312.15
4.3.60.0000.01012.15
4.3.50.0000.01312.15
4.3.40.0000.02012.15
4.3.30.0000.03312.15
4.3.20.0030.01012.15
4.3.10.0030.03012.15
4.3.00.0030.02012.15

preferences:
45.71 ms | 400 KiB | 5 Q