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> <child name='Child4' /> </root>"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( './/child') as $child) { 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.60.0120.00618.81
8.3.50.0210.00821.46
8.3.40.0090.00619.21
8.3.30.0100.00320.73
8.3.20.0030.00519.20
8.3.10.0000.00821.50
8.3.00.0080.00022.76
8.2.180.0160.00316.75
8.2.170.0070.00722.96
8.2.160.0000.01520.81
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00021.57
8.2.110.0050.00522.62
8.2.100.0130.00018.22
8.2.90.0080.00019.55
8.2.80.0000.00818.30
8.2.70.0110.00018.13
8.2.60.0060.00318.29
8.2.50.0050.00318.30
8.2.40.0040.00418.72
8.2.30.0000.00818.42
8.2.20.0040.00418.07
8.2.10.0040.00418.27
8.2.00.0060.00318.24
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00320.94
8.1.230.0060.00621.26
8.1.220.0040.00418.77
8.1.210.0040.00419.35
8.1.200.0040.00417.86
8.1.190.0040.00417.91
8.1.180.0030.00618.10
8.1.170.0000.00819.28
8.1.160.0070.00019.29
8.1.150.0040.00418.94
8.1.140.0000.00817.83
8.1.130.0030.00318.13
8.1.120.0040.00417.91
8.1.110.0040.00417.80
8.1.100.0000.00817.88
8.1.90.0040.00417.89
8.1.80.0070.00017.64
8.1.70.0000.00717.88
8.1.60.0030.00617.95
8.1.50.0040.00417.83
8.1.40.0040.00417.77
8.1.30.0040.00417.85
8.1.20.0040.00418.00
8.1.10.0040.00418.02
8.1.00.0000.01017.94
8.0.300.0050.00520.30
8.0.290.0000.00717.13
8.0.280.0000.00718.79
8.0.270.0030.00317.66
8.0.260.0000.00717.22
8.0.250.0000.00817.48
8.0.240.0060.00317.27
8.0.230.0000.00717.36
8.0.220.0000.00717.41
8.0.210.0000.00717.15
8.0.200.0030.00317.35
8.0.190.0030.00317.46
8.0.180.0050.00217.28
8.0.170.0030.00517.16
8.0.160.0050.00217.25
8.0.150.0000.00817.15
8.0.140.0030.00517.35
8.0.130.0050.00013.70
8.0.120.0030.00617.14
8.0.110.0070.00017.34
8.0.100.0040.00417.38
8.0.90.0040.00417.33
8.0.80.0110.00417.36
8.0.70.0000.00817.14
8.0.60.0040.00417.15
8.0.50.0000.00817.30
8.0.30.0080.01117.41
8.0.20.0110.01117.79
8.0.10.0020.00517.36
8.0.00.0100.00917.14
7.4.330.0000.00517.12
7.4.320.0000.00616.90
7.4.300.0000.00616.93
7.4.290.0050.00216.86
7.4.280.0000.00716.90
7.4.270.0000.00716.95
7.4.260.0030.00313.68
7.4.250.0080.00016.93
7.4.240.0040.00416.91
7.4.230.0030.00316.96
7.4.220.0090.00916.99
7.4.210.0100.00617.00
7.4.200.0030.00516.86
7.4.190.0070.00017.02
7.4.160.0060.01516.90
7.4.150.0070.01117.40
7.4.140.0110.00817.86
7.4.130.0040.01416.91
7.4.120.0060.01116.95
7.4.110.0070.01716.77
7.4.100.0030.01316.91
7.4.90.0190.00016.98
7.4.80.0170.00819.39
7.4.70.0060.01216.82
7.4.60.0080.01116.89
7.4.50.0060.00316.84
7.4.40.0130.00022.77
7.4.30.0070.01017.00
7.4.00.0030.01215.14
7.3.330.0030.00313.40
7.3.320.0050.00013.58
7.3.310.0030.00316.65
7.3.300.0090.00016.61
7.3.290.0000.01316.59
7.3.280.0110.00816.57
7.3.270.0150.00317.40
7.3.260.0130.00618.24
7.3.250.0120.00916.84
7.3.240.0040.01216.62
7.3.230.0100.00716.89
7.3.210.0100.00716.83
7.3.200.0060.01219.39
7.3.190.0100.01316.71
7.3.180.0070.01016.73
7.3.170.0080.00816.82
7.3.160.0130.00816.86
7.3.120.0090.00615.08
7.3.110.0100.00714.96
7.3.100.0100.00714.88
7.3.90.0070.00715.21
7.3.80.0070.00714.96
7.3.70.0000.00915.07
7.3.60.0100.00315.00
7.3.50.0060.00914.86
7.3.40.0090.00615.07
7.3.30.0120.00614.99
7.3.20.0060.00916.82
7.3.10.0030.00616.72
7.3.00.0030.01116.75
7.2.330.0120.00617.10
7.2.320.0110.00717.00
7.2.310.0000.01617.02
7.2.300.0150.00616.93
7.2.290.0030.01417.08
7.2.250.0110.00715.55
7.2.240.0110.00715.29
7.2.230.0070.00715.23
7.2.220.0130.00715.49
7.2.210.0060.00915.21
7.2.200.0040.00715.27
7.2.190.0090.00615.33
7.2.180.0000.01315.20
7.2.170.0070.01115.17
7.2.130.0070.00717.09
7.2.120.0060.00616.93
7.2.110.0030.00717.18
7.2.100.0070.00417.10
7.2.90.0000.00917.07
7.2.80.0080.00616.98
7.2.70.0130.00317.04
7.2.60.0140.00616.89
7.2.50.0110.00717.15
7.2.40.0090.00617.34
7.2.30.0030.00917.09
7.2.20.0000.00917.04
7.2.10.0120.00317.11
7.2.00.0050.00918.35
7.1.330.0110.00315.79
7.1.320.0030.00715.93
7.1.310.0110.00416.07
7.1.300.0030.00615.88
7.1.290.0070.00715.95
7.1.280.0060.01215.89
7.1.270.0070.00415.90
7.1.260.0090.00315.91
7.1.250.0130.00616.10
7.1.240.0130.00315.86
7.1.230.0040.00815.92
7.1.220.0060.00615.79
7.1.210.0000.01315.77
7.1.200.0030.00815.95
7.1.190.0070.00715.63
7.1.180.0090.00315.93
7.1.170.0080.00515.79
7.1.160.0050.00515.84
7.1.150.0030.00916.09
7.1.140.0030.00915.91
7.1.130.0000.00816.07
7.1.120.0110.00316.16
7.1.110.0060.00315.97
7.1.100.0030.01117.00
7.1.90.0040.00815.94
7.1.80.0100.00316.12
7.1.70.0060.00816.61
7.1.60.0080.00617.49
7.1.50.0160.00316.55
7.1.40.0000.01015.88
7.1.30.0040.00815.86
7.1.20.0040.01115.66
7.1.10.0000.01515.80
7.1.00.0050.02019.26
7.0.330.0110.00015.41
7.0.320.0000.00815.46
7.0.310.0080.00015.53
7.0.300.0080.00515.51
7.0.290.0030.01015.54
7.0.280.0060.00315.62
7.0.270.0030.01015.56
7.0.260.0040.01115.70
7.0.250.0040.00415.60
7.0.240.0050.00515.82
7.0.230.0070.01115.38
7.0.220.0090.00615.48
7.0.210.0070.00415.73
7.0.200.0020.00716.31
7.0.190.0030.00915.57
7.0.180.0110.00315.46
7.0.170.0000.01115.76
7.0.160.0110.00015.66
7.0.150.0090.00315.56
7.0.140.0070.03818.93
7.0.130.0080.00015.67
7.0.120.0030.01115.50
7.0.110.0090.00415.52
7.0.100.0050.02317.95
7.0.90.0080.02317.89
7.0.80.0070.04117.91
7.0.70.0080.02517.88
7.0.60.0080.02817.85
7.0.50.0130.01818.07
7.0.40.0080.03516.86
7.0.30.0020.03016.99
7.0.20.0050.03016.92
7.0.10.0050.02817.00
7.0.00.0040.02516.94
5.6.380.0070.00714.48
5.6.370.0030.01014.71
5.6.360.0000.01114.53
5.6.350.0130.00014.37
5.6.340.0060.00614.18
5.6.330.0040.01514.76
5.6.320.0070.00714.32
5.6.310.0030.01014.45
5.6.300.0060.00614.87
5.6.290.0040.01114.20
5.6.280.0030.04317.96
5.6.270.0040.01214.32
5.6.260.0100.00314.44
5.6.250.0020.02917.77
5.6.240.0070.02617.50
5.6.230.0060.02417.49
5.6.220.0060.02317.56
5.6.210.0050.02217.63
5.6.200.0030.03517.85
5.6.190.0040.02417.70
5.6.180.0100.02017.71
5.6.170.0050.02517.74
5.6.160.0050.02517.87
5.6.150.0070.03517.88
5.6.140.0070.02817.85
5.6.130.0030.05017.83
5.6.120.0070.03717.87
5.6.110.0020.04717.84
5.6.100.0050.04817.84
5.6.90.0040.04717.86
5.6.80.0100.03817.53
5.6.70.0080.03917.43
5.6.60.0060.03117.37
5.6.50.0090.03917.44
5.6.40.0080.04317.49
5.6.30.0050.04017.34
5.6.20.0130.03917.38
5.6.10.0090.04017.51
5.6.00.0050.04417.62
5.5.380.0000.02715.80
5.5.370.0060.01815.93
5.5.360.0020.02815.77
5.5.350.0030.02315.92
5.5.340.0080.02216.16
5.5.330.0100.03815.95
5.5.320.0060.02216.13
5.5.310.0050.02515.97
5.5.300.0110.03316.12
5.5.290.0050.04115.97
5.5.280.0060.03816.05
5.5.270.0020.04516.09
5.5.260.0100.04016.11
5.5.250.0050.04616.06
5.5.240.0030.04615.77
5.5.230.0100.03715.69
5.5.220.0070.02515.68
5.5.210.0090.04015.79
5.5.200.0030.04115.75
5.5.190.0080.03515.66
5.5.180.0070.04215.58
5.5.170.0030.00611.09
5.5.160.0020.03115.62
5.5.150.0030.04315.60
5.5.140.0130.03015.55
5.5.130.0070.04215.73
5.5.120.0050.04415.83
5.5.110.0110.03815.81
5.5.100.0050.04415.68
5.5.90.0080.04015.71
5.5.80.0040.03315.63
5.5.70.0030.04115.64
5.5.60.0060.04115.78
5.5.50.0030.03315.65
5.5.40.0110.03615.71
5.5.30.0070.02715.73
5.5.20.0060.03915.67
5.5.10.0030.04615.58
5.5.00.0090.03715.46
5.4.450.0070.04215.37
5.4.440.0080.04115.34
5.4.430.0070.02415.41
5.4.420.0070.03815.30
5.4.410.0070.04215.25
5.4.400.0080.03515.10
5.4.390.0060.03915.13
5.4.380.0070.04015.05
5.4.370.0030.04115.02
5.4.360.0050.04315.15
5.4.350.0000.04615.16
5.4.340.0030.04315.22
5.4.330.0050.00011.27
5.4.320.0080.03615.15
5.4.310.0120.03215.19
5.4.300.0030.04415.15
5.4.290.0020.02814.99
5.4.280.0100.03315.31
5.4.270.0070.04015.19
5.4.260.0080.03815.03
5.4.250.0070.04214.99
5.4.240.0100.03115.05
5.4.230.0070.04014.98
5.4.220.0110.03815.20
5.4.210.0080.04015.07
5.4.200.0110.03715.08
5.4.190.0050.04115.13
5.4.180.0070.03615.05
5.4.170.0050.04314.97
5.4.160.0000.03515.27
5.4.150.0060.02515.04
5.4.140.0090.03713.80
5.4.130.0050.04013.81
5.4.120.0050.02313.71
5.4.110.0070.03713.96
5.4.100.0080.03713.83
5.4.90.0110.03313.71
5.4.80.0030.04213.85
5.4.70.0050.04113.80
5.4.60.0050.04013.81
5.4.50.0070.03713.63
5.4.40.0090.03813.77
5.4.30.0050.04113.81
5.4.20.0070.03813.69
5.4.10.0050.04313.85
5.4.00.0050.03813.52
5.3.290.0070.03812.45
5.3.280.0000.04612.28
5.3.270.0070.03912.30
5.3.260.0120.03512.42
5.3.250.0060.02812.39
5.3.240.0030.04312.25
5.3.230.0060.03612.23
5.3.220.0080.03812.30
5.3.210.0050.04312.25
5.3.200.0080.02412.30
5.3.190.0050.04012.31
5.3.180.0050.04212.41
5.3.170.0050.04312.44
5.3.160.0100.02312.39
5.3.150.0030.04112.41
5.3.140.0050.04212.34
5.3.130.0060.04112.23
5.3.120.0090.03912.40
5.3.110.0030.02812.32
5.3.100.0080.03912.01
5.3.90.0080.02012.12
5.3.80.0020.04012.09
5.3.70.0060.02212.05
5.3.60.0070.03812.09
5.3.50.0020.02412.02
5.3.40.0070.03712.00
5.3.30.0060.03511.88
5.3.20.0060.03611.91
5.3.10.0050.03311.74
5.3.00.0040.02311.73
5.2.170.0050.03110.87
5.2.160.0040.02510.87
5.2.150.0060.02810.87
5.2.140.0050.02210.87
5.2.130.0050.03310.87
5.2.120.0000.03510.87
5.2.110.0020.03610.87
5.2.100.0010.02010.87
5.2.90.0050.03310.87
5.2.80.0090.02810.87
5.2.70.0080.03210.87
5.2.60.0070.03210.87
5.2.50.0080.02310.87
5.2.40.0050.03110.87
5.2.30.0060.03410.87
5.2.20.0060.02810.87
5.2.10.0120.02310.87
5.2.00.0000.03510.87
5.1.60.0070.02710.87
5.1.50.0000.02410.87
5.1.40.0000.02910.87
5.1.30.0030.03310.87
5.1.20.0030.03810.87
5.1.10.0080.02310.87
5.1.00.0080.02310.87
5.0.50.0030.02510.87
5.0.40.0020.02210.87
5.0.30.0010.03110.87
5.0.20.0050.02310.87
5.0.10.0090.01510.87
5.0.00.0020.03210.87
4.4.90.0000.02210.87
4.4.80.0040.01710.87
4.4.70.0020.02210.87
4.4.60.0020.02210.87
4.4.50.0030.01810.87
4.4.40.0050.02510.87
4.4.30.0030.01810.87
4.4.20.0030.02110.87
4.4.10.0050.01810.87
4.4.00.0020.02210.87
4.3.110.0020.01010.87
4.3.100.0020.02010.87
4.3.90.0010.02010.87
4.3.80.0030.02010.87
4.3.70.0020.01410.87
4.3.60.0030.02010.87
4.3.50.0010.02010.87
4.3.40.0030.02610.87
4.3.30.0030.01310.87
4.3.20.0020.01910.87
4.3.10.0000.02110.87
4.3.00.0020.01810.87

preferences:
42.9 ms | 401 KiB | 5 Q