3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent name='subchild'> naiya </subparent> </parent> <child name='Child4' /> </root>"; $xml = simplexml_load_string( $xml); echo $xml->xpath( '//child[@name="Child2"]'); foreach( $xml->xpath( '//child[@name="Child2"]')-> children as $child) { $attributes = $child->attributes(); echo $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.70.0150.00617.00
8.3.60.0110.00719.05
8.3.50.0230.01122.07
8.3.40.0040.01219.21
8.3.30.0070.00719.38
8.3.20.0030.00520.46
8.3.10.0040.00424.03
8.3.00.0030.00519.63
8.2.180.0070.00716.88
8.2.170.0060.00922.96
8.2.160.0070.00720.75
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0040.00421.50
8.2.110.0050.00519.56
8.2.100.0040.00818.41
8.2.90.0090.00019.47
8.2.80.0050.00317.97
8.2.70.0080.00017.88
8.2.60.0040.00418.18
8.2.50.0000.00918.07
8.2.40.0040.00418.53
8.2.30.0070.00018.58
8.2.20.0040.00418.21
8.2.10.0040.00418.54
8.2.00.0080.00017.98
8.1.280.0110.00725.92
8.1.270.0000.00922.43
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0100.00022.43
8.1.230.0090.00321.28
8.1.220.0040.00418.16
8.1.210.0040.00418.77
8.1.200.0070.00317.73
8.1.190.0050.00317.47
8.1.180.0080.00018.10
8.1.170.0040.00420.67
8.1.160.0000.00722.34
8.1.150.0000.00819.14
8.1.140.0000.00917.63
8.1.130.0000.00718.16
8.1.120.0000.00717.85
8.1.110.0050.00317.84
8.1.100.0000.00717.83
8.1.90.0000.00717.87
8.1.80.0000.00817.63
8.1.70.0040.00417.66
8.1.60.0030.00617.91
8.1.50.0050.00417.69
8.1.40.0000.00717.77
8.1.30.0030.00517.96
8.1.20.0050.00317.83
8.1.10.0090.00017.74
8.1.00.0050.00317.79
8.0.300.0000.00718.77
8.0.290.0040.00417.00
8.0.280.0040.00418.86
8.0.270.0030.00417.60
8.0.260.0040.00417.58
8.0.250.0070.00017.46
8.0.240.0030.00317.25
8.0.230.0040.00417.37
8.0.220.0000.00717.37
8.0.210.0030.00317.10
8.0.200.0000.00817.36
8.0.190.0040.00417.40
8.0.180.0050.00317.41
8.0.170.0000.00717.20
8.0.160.0000.00717.41
8.0.150.0040.00417.30
8.0.140.0000.00817.29
8.0.130.0060.00013.60
8.0.120.0030.00617.33
8.0.110.0040.00417.16
8.0.100.0030.00317.32
8.0.90.0000.00817.37
8.0.80.0030.01317.24
8.0.70.0050.00317.36
8.0.60.0050.00317.24
8.0.50.0000.00717.40
8.0.30.0100.00917.42
8.0.20.0050.01817.58
8.0.10.0040.00417.38
8.0.00.0140.00317.00
7.4.330.0050.00015.43
7.4.320.0000.00616.79
7.4.300.0060.00016.79
7.4.290.0030.00316.84
7.4.280.0090.00016.91
7.4.270.0050.00316.71
7.4.260.0000.00716.76
7.4.250.0070.00016.88
7.4.240.0010.00616.83
7.4.230.0000.00717.05
7.4.220.0100.01616.80
7.4.210.0210.00016.89
7.4.200.0030.00316.74
7.4.160.0090.00916.87
7.4.150.0100.01017.40
7.4.140.0130.00817.86
7.4.130.0060.01416.79
7.4.120.0120.00516.87
7.4.110.0110.00816.78
7.4.100.0080.00816.80
7.4.90.0070.01316.75
7.4.80.0120.00619.39
7.4.70.0120.00416.92
7.4.60.0040.01116.96
7.4.50.0060.00316.60
7.4.40.0120.00616.81
7.4.30.0070.01116.93
7.4.10.0120.00615.02
7.4.00.0030.01515.22
7.3.330.0000.00813.47
7.3.320.0050.00013.21
7.3.310.0000.00716.49
7.3.300.0050.00216.58
7.3.290.0080.00816.50
7.3.280.0100.00716.63
7.3.270.0030.01517.40
7.3.260.0150.00916.63
7.3.250.0090.00816.51
7.3.240.0030.01416.64
7.3.230.0110.00716.61
7.3.210.0070.01016.45
7.3.200.0150.00619.39
7.3.190.0090.00916.65
7.3.180.0130.00616.80
7.3.170.0070.01416.64
7.3.160.0110.00616.68
7.3.130.0110.00714.74
7.3.120.0060.01314.73
7.3.110.0130.00314.97
7.3.100.0040.01514.86
7.3.90.0030.01014.97
7.3.80.0040.00914.85
7.3.70.0120.00415.09
7.3.60.0080.00414.86
7.3.50.0060.00914.98
7.3.40.0000.00915.01
7.3.30.0070.00714.67
7.3.20.0070.01416.78
7.3.10.0030.01416.76
7.3.00.0050.00816.60
7.2.330.0150.00316.99
7.2.320.0060.01316.82
7.2.310.0150.00816.80
7.2.300.0170.00017.01
7.2.290.0120.00616.82
7.2.260.0000.01514.91
7.2.250.0060.01015.26
7.2.240.0040.00815.23
7.2.230.0060.00915.08
7.2.220.0070.01015.11
7.2.210.0090.00615.23
7.2.200.0060.01015.23
7.2.190.0090.00614.75
7.2.180.0030.01115.42
7.2.170.0000.01415.06
7.2.160.0070.00714.78
7.2.150.0110.00717.09
7.2.140.0030.00716.99
7.2.130.0090.00517.15
7.2.120.0060.00917.05
7.2.110.0050.00816.93
7.2.100.0070.00616.86
7.2.90.0070.00717.17
7.2.80.0170.00517.10
7.2.70.0130.00716.83
7.2.60.0100.00516.91
7.2.50.0100.00717.18
7.2.40.0040.01017.04
7.2.30.0080.00817.04
7.2.20.0040.01017.06
7.2.10.0070.00617.10
7.2.00.0080.00917.73
7.1.330.0000.01015.73
7.1.320.0030.01415.79
7.1.310.0000.01115.95
7.1.300.0060.00615.77
7.1.290.0030.01315.83
7.1.280.0050.00515.78
7.1.270.0050.00515.82
7.1.260.0070.00715.64
7.1.250.0030.00815.97
7.1.240.0060.00515.90
7.1.230.0100.00315.85
7.1.220.0110.00515.84
7.1.210.0100.00315.89
7.1.200.0110.00415.74
7.1.190.0110.00715.81
7.1.180.0080.00815.77
7.1.170.0060.00615.76
7.1.160.0080.00916.05
7.1.150.0090.00915.86
7.1.140.0030.01015.96
7.1.130.0130.00615.90
7.1.120.0120.00316.11
7.1.110.0080.00815.79
7.1.100.0070.00516.60
7.1.90.0060.00915.84
7.1.80.0040.00915.84
7.1.70.0090.00316.25
7.1.60.0060.01217.03
7.1.50.0100.01322.14
7.1.40.0030.01115.75
7.1.30.0110.00615.94
7.1.20.0040.01115.69
7.1.10.0090.00115.95
7.1.00.0090.03018.08
7.0.330.0050.00515.48
7.0.320.0010.01015.46
7.0.310.0040.00815.61
7.0.300.0080.00815.37
7.0.290.0070.00715.47
7.0.280.0020.00915.53
7.0.270.0030.01115.56
7.0.260.0080.00615.47
7.0.250.0090.00515.55
7.0.240.0100.00415.52
7.0.230.0140.00815.62
7.0.220.0060.00515.53
7.0.210.0090.00615.67
7.0.200.0060.00516.05
7.0.190.0130.00815.63
7.0.180.0170.00815.68
7.0.170.0050.00815.39
7.0.160.0040.00815.55
7.0.150.0050.00815.62
7.0.140.0050.03217.68
7.0.130.0110.00315.44
7.0.120.0080.00915.51
7.0.110.0040.01215.49
7.0.100.0090.00715.55
7.0.90.0090.00615.39
7.0.80.0060.00815.55
7.0.70.0080.00715.59
7.0.60.0120.02916.98
7.0.50.0070.01716.38
7.0.40.0080.02515.89
7.0.30.0150.02415.74
7.0.20.0110.02015.78
7.0.10.0050.03115.91
7.0.00.0050.02215.88
5.6.400.0000.01314.27
5.6.390.0060.00614.38
5.6.380.0040.01214.51
5.6.370.0090.00214.33
5.6.360.0030.01014.45
5.6.350.0030.01014.68
5.6.340.0040.01114.36
5.6.330.0030.01214.15
5.6.320.0050.00514.59
5.6.310.0060.00714.69
5.6.300.0030.00914.51
5.6.290.0060.01214.47
5.6.280.0020.03216.80
5.6.270.0070.00814.20
5.6.260.0080.01014.50
5.6.250.0050.01314.32
5.6.240.0120.00514.58
5.6.230.0060.00514.25
5.6.220.0060.01114.60
5.6.210.0130.02916.53
5.6.200.0050.03115.82
5.6.190.0110.02816.55
5.6.180.0140.03216.52
5.6.170.0110.02016.62
5.6.160.0070.02716.49
5.6.150.0040.03215.77
5.6.140.0070.01715.78
5.6.130.0070.03215.67
5.6.120.0040.03916.62
5.6.110.0080.01716.65
5.6.100.0060.03116.63
5.6.90.0100.03216.70
5.6.80.0080.01916.55
5.6.70.1120.01916.49
5.6.60.0050.00614.34
5.6.50.0070.00714.38
5.6.40.0070.00514.16
5.6.30.0060.00914.35
5.6.20.0060.01114.25
5.6.10.0100.00614.35
5.6.00.0110.00814.41
5.5.380.0060.00813.01
5.5.370.0070.00613.00
5.5.360.0060.00612.84
5.5.350.0130.03115.51
5.5.340.0080.02814.60
5.5.330.0010.02715.43
5.5.320.0110.01615.30
5.5.310.0150.02815.40
5.5.300.0060.02914.67
5.5.290.0020.02714.62
5.5.280.0040.01815.64
5.5.270.0100.03115.57
5.5.260.0080.02815.48
5.5.250.0060.03015.45
5.5.240.0140.02815.33
5.5.230.0080.00512.84
5.5.220.0080.00312.80
5.5.210.0070.00412.68
5.5.200.0100.00412.84
5.5.190.0120.00412.77
5.5.180.0070.00412.73
5.5.170.0070.00712.63
5.5.160.0080.00712.79
5.5.150.0100.00712.76
5.5.140.0040.00712.56
5.5.130.0040.00912.65
5.5.120.0040.00912.65
5.5.110.0080.00612.49
5.5.100.0070.00512.57
5.5.90.0000.01312.63
5.5.80.0020.00912.60
5.5.70.0060.00512.53
5.5.60.0030.00912.54
5.5.50.0000.01212.41
5.5.40.0020.00812.63
5.5.30.0060.00612.57
5.5.20.0050.00812.45
5.5.10.0050.00612.71
5.5.00.0070.00412.63
5.4.450.0070.02314.14
5.4.440.0280.02114.24
5.4.430.0240.02414.27
5.4.420.0300.02314.25
5.4.410.0300.02114.16
5.4.400.0270.02614.18
5.4.390.0290.02914.08
5.4.380.0320.02014.15
5.4.370.0280.02214.03
5.4.360.0250.02214.04
5.4.350.0190.01914.13
5.4.340.0080.01511.75
5.4.330.0030.00811.51
5.4.320.0060.01711.91
5.4.310.0040.01811.91
5.4.300.0040.01611.91
5.4.290.0060.01711.91
5.4.280.0040.01711.88
5.4.270.0070.01311.88
5.4.260.0040.01611.88
5.4.250.0060.01611.88
5.4.240.0020.01711.88
5.4.230.0040.01611.88
5.4.220.0040.01811.88
5.4.210.0050.01511.88
5.4.200.0040.01611.88
5.4.190.0050.01511.87
5.4.180.0030.01911.87
5.4.170.0030.01911.89
5.4.160.0050.01511.88
5.4.150.0030.01711.88
5.4.140.0020.01611.77
5.4.130.0040.01711.77
5.4.120.0070.01411.75
5.4.110.0030.01611.75
5.4.100.0070.01411.75
5.4.90.0010.01811.75
5.4.80.0060.01411.75
5.4.70.0050.01511.76
5.4.60.0040.01411.75
5.4.50.0060.01611.75
5.4.40.0040.01511.74
5.4.30.0030.01711.74
5.4.20.0050.01611.74
5.4.10.0040.01511.74
5.4.00.0040.01411.57
5.3.290.0030.02512.08
5.3.280.0080.01912.04
5.3.270.0050.02212.05
5.3.260.0020.02412.05
5.3.250.0060.02212.05
5.3.240.0050.01912.05
5.3.230.0040.02112.05
5.3.220.0040.02612.03
5.3.210.0070.02712.03
5.3.200.0070.02112.03
5.3.190.0040.02412.03
5.3.180.0040.02112.03
5.3.170.0060.02312.03
5.3.160.0040.02512.03
5.3.150.0080.02312.03
5.3.140.0070.01712.03
5.3.130.0060.02112.02
5.3.120.0050.02212.02
5.3.110.0060.02212.02
5.3.100.0060.02111.77
5.3.90.0040.02111.76
5.3.80.0050.02011.75
5.3.70.0050.02511.75
5.3.60.0040.02311.74
5.3.50.0020.02511.71
5.3.40.0030.02111.72
5.3.30.0050.01911.70
5.3.20.0060.02011.59
5.3.10.0060.02011.57
5.3.00.0060.01911.56
5.2.170.0030.01810.31
5.2.160.0050.01610.31
5.2.150.0020.02110.31
5.2.140.0050.01610.31
5.2.130.0030.01610.29
5.2.120.0020.01710.29
5.2.110.0040.01610.29
5.2.100.0050.01710.29
5.2.90.0060.01810.29
5.2.80.0010.02310.29
5.2.70.0060.01710.29
5.2.60.0040.02010.27
5.2.50.0020.02510.25
5.2.40.0040.01910.24
5.2.30.0030.01910.22
5.2.20.0020.02010.22
5.2.10.0040.01710.18
5.2.00.0040.01710.11
5.1.60.0020.0169.76
5.1.50.0050.0139.75
5.1.40.0010.0179.74
5.1.30.0040.0169.92
5.1.20.0040.0149.93
5.1.10.0020.0189.79
5.1.00.0040.0149.79
5.0.50.0030.0119.02
5.0.40.0030.0128.95
5.0.30.0010.0198.87
5.0.20.0020.0158.85
5.0.10.0050.0108.84
5.0.00.0020.0188.83
4.4.90.0030.0107.98
4.4.80.0040.0087.96
4.4.70.0030.0107.97
4.4.60.0030.0097.97
4.4.50.0030.0097.97
4.4.40.0030.0157.94
4.4.30.0030.0097.97
4.4.20.0030.0098.01
4.4.10.0030.0098.01
4.4.00.0030.0147.97
4.3.110.0040.0107.92
4.3.100.0020.0117.92
4.3.90.0050.0077.91
4.3.80.0010.0207.88
4.3.70.0020.0087.90
4.3.60.0020.0107.90
4.3.50.0020.0107.90
4.3.40.0030.0207.86
4.3.30.0010.0137.23
4.3.20.0010.0117.22
4.3.10.0010.0137.20
4.3.00.0130.0139.09

preferences:
48.87 ms | 401 KiB | 5 Q