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) { $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.60.0100.01018.68
8.3.50.0150.00821.39
8.3.40.0110.00418.95
8.3.30.0030.01019.56
8.3.20.0040.00420.63
8.3.10.0050.00323.98
8.3.00.0060.00319.88
8.2.180.0160.00317.13
8.2.170.0080.01122.96
8.2.160.0070.00720.74
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00022.50
8.2.110.0040.00721.54
8.2.100.0090.00318.29
8.2.90.0030.00619.58
8.2.80.0030.00618.13
8.2.70.0000.00818.09
8.2.60.0040.00418.30
8.2.50.0030.00518.07
8.2.40.0000.00818.53
8.2.30.0080.00018.41
8.2.20.0040.00418.06
8.2.10.0030.00518.44
8.2.00.0000.00818.22
8.1.280.0090.00925.92
8.1.270.0070.00722.47
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00324.33
8.1.230.0040.00719.38
8.1.220.0000.00818.16
8.1.210.0060.00318.77
8.1.200.0040.00417.73
8.1.190.0030.00617.73
8.1.180.0000.00918.10
8.1.170.0060.00620.70
8.1.160.0040.00422.49
8.1.150.0000.00819.18
8.1.140.0000.00717.92
8.1.130.0070.00018.25
8.1.120.0040.00417.82
8.1.110.0070.00017.96
8.1.100.0040.00417.67
8.1.90.0040.00417.90
8.1.80.0040.00417.93
8.1.70.0000.00717.66
8.1.60.0000.00918.02
8.1.50.0000.00817.74
8.1.40.0030.00517.85
8.1.30.0030.00617.96
8.1.20.0040.00418.12
8.1.10.0050.00318.06
8.1.00.0000.00717.70
8.0.300.0070.00018.77
8.0.290.0040.00417.00
8.0.280.0000.00718.84
8.0.270.0000.00717.65
8.0.260.0070.00017.59
8.0.250.0040.00417.43
8.0.240.0030.00317.36
8.0.230.0070.00017.38
8.0.220.0030.00317.35
8.0.210.0000.00717.25
8.0.200.0030.00317.42
8.0.190.0040.00417.32
8.0.180.0070.00017.38
8.0.170.0060.00317.36
8.0.160.0040.00417.36
8.0.150.0000.00817.37
8.0.140.0000.00717.24
8.0.130.0000.00613.66
8.0.120.0040.00417.14
8.0.110.0000.00817.13
8.0.100.0040.00417.33
8.0.90.0000.00717.25
8.0.80.0040.01117.32
8.0.70.0040.00417.20
8.0.60.0000.00717.24
8.0.50.0020.00517.24
8.0.30.0090.00917.44
8.0.20.0100.01617.51
8.0.10.0040.00417.21
8.0.00.0110.00617.31
7.4.330.0000.00515.40
7.4.320.0060.00016.84
7.4.300.0030.00316.99
7.4.290.0030.00316.89
7.4.280.0050.00317.00
7.4.270.0070.00016.96
7.4.260.0030.00317.00
7.4.250.0000.00716.94
7.4.240.0050.00217.07
7.4.230.0030.00517.00
7.4.220.0040.01416.96
7.4.210.0070.01516.88
7.4.200.0000.00816.79
7.4.160.0040.01516.77
7.4.150.0090.01217.40
7.4.140.0050.01217.86
7.4.130.0110.00916.89
7.4.120.0120.00616.99
7.4.110.0130.00616.73
7.4.100.0160.00616.98
7.4.90.0110.01316.79
7.4.80.0140.00319.39
7.4.70.0090.00916.80
7.4.60.0120.00617.00
7.4.50.0040.00416.97
7.4.40.0070.01016.77
7.4.30.0080.00816.93
7.4.00.0060.00915.20
7.3.330.0030.00313.36
7.3.320.0060.00013.49
7.3.310.0000.00816.71
7.3.300.0030.00316.62
7.3.290.0040.01016.69
7.3.280.0090.00816.63
7.3.270.0090.01117.40
7.3.260.0070.01016.95
7.3.250.0040.01316.67
7.3.240.0120.00917.03
7.3.230.0100.01016.66
7.3.210.0140.00316.64
7.3.200.0070.01019.39
7.3.190.0070.01116.85
7.3.180.0100.00716.85
7.3.170.0120.00616.83
7.3.160.0120.00316.81
7.2.330.0130.00517.18
7.2.320.0100.00717.16
7.2.310.0160.01017.05
7.2.300.0030.01416.79
7.2.290.0070.01017.12
7.2.60.0080.00817.20
7.2.00.0040.00819.86
7.1.200.0060.00315.93
7.1.100.0000.00818.45
7.1.70.0080.00017.35
7.1.60.0070.01719.32
7.1.50.0240.00735.04
7.1.00.0100.07022.52
7.0.200.0000.01017.09
7.0.140.0000.07722.18
7.0.60.0170.07720.23
7.0.50.0100.08318.05
7.0.40.0070.05320.48
7.0.30.0270.07320.53
7.0.20.0270.07720.20
7.0.10.0070.08720.40
7.0.00.0100.06320.38
5.6.280.0070.07021.14
5.6.210.0070.07320.76
5.6.200.0070.04018.27
5.6.190.0000.05720.88
5.6.180.0300.05720.77
5.6.170.0230.03720.59
5.6.160.0130.07720.55
5.6.150.0100.04718.37
5.6.140.0170.05718.39
5.6.130.0070.07718.42
5.6.120.0030.04721.30
5.6.110.0100.07721.15
5.6.100.0100.05721.27
5.6.90.0070.05021.15
5.6.80.0100.07020.61
5.6.70.4630.04020.53
5.5.350.0270.08020.61
5.5.340.0070.08018.11
5.5.330.0200.05020.68
5.5.320.0230.05020.50
5.5.310.0170.04320.46
5.5.300.0100.05018.14
5.5.290.0070.05018.16
5.5.280.0000.04320.95
5.5.270.0070.08020.95
5.5.260.0100.05320.91
5.5.250.0000.08720.86
5.5.240.0170.08020.45
5.4.450.0670.05319.80
5.4.440.0630.07319.76
5.4.430.0730.05719.78
5.4.420.0170.04719.70
5.4.410.0730.05719.36
5.4.400.0670.06019.51
5.4.390.0700.05319.27
5.4.380.0600.06319.27
5.4.370.0700.06319.27
5.4.360.0770.06319.52
5.4.350.0100.05719.40
5.4.340.0040.03612.21
5.4.320.0060.03612.70
5.4.310.0030.04112.69
5.4.300.0040.03912.70
5.4.290.0050.03912.70
5.4.280.0070.03412.60
5.4.270.0070.03512.60
5.4.260.0070.03612.59
5.4.250.0050.03812.60
5.4.240.0030.03912.60
5.4.230.0050.03812.59
5.4.220.0060.03712.59
5.4.210.0080.03412.59
5.4.200.0050.03812.59
5.4.190.0090.03312.58
5.4.180.0070.03512.58
5.4.170.0060.03612.60
5.4.160.0060.03712.59
5.4.150.0070.03512.59
5.4.140.0030.04012.27
5.4.130.0060.03712.26
5.4.120.0050.03512.21
5.4.110.0060.03512.21
5.4.100.0040.03812.21
5.4.90.0070.03612.21
5.4.80.0030.04112.21
5.4.70.0040.03912.21
5.4.60.0080.03312.21
5.4.50.0050.03612.20
5.4.40.0080.03312.19
5.4.30.0060.03612.18
5.4.20.0030.03812.19
5.4.10.0040.03712.19
5.4.00.0060.03611.68
5.3.290.0090.04012.96
5.3.280.0100.04512.89
5.3.270.0050.04312.91
5.3.260.0090.03912.91
5.3.250.0080.03512.91
5.3.240.0100.03412.91
5.3.230.0050.03912.90
5.3.220.0060.03712.87
5.3.210.0050.04012.87
5.3.200.0040.03812.86
5.3.190.0050.03812.87
5.3.180.0080.04012.86
5.3.170.0070.03812.87
5.3.160.0040.04112.86
5.3.150.0060.03612.87
5.3.140.0030.03912.85
5.3.130.0090.03612.85
5.3.120.0060.04312.85
5.3.110.0030.04112.85
5.3.100.0030.03912.34
5.3.90.0060.03712.32
5.3.80.0050.03712.30
5.3.70.0030.03812.30
5.3.60.0070.03512.29
5.3.50.0050.03612.23
5.3.40.0030.03812.23
5.3.30.0060.03412.20
5.3.20.0060.03411.98
5.3.10.0050.03511.95
5.3.00.0130.02811.93
5.2.170.0060.0289.43
5.2.160.0040.0299.43
5.2.150.0030.0409.43
5.2.140.0060.0309.43
5.2.130.0050.0299.39
5.2.120.0040.0299.39
5.2.110.0050.0289.40
5.2.100.0020.0329.39
5.2.90.0010.0329.39
5.2.80.0060.0289.38
5.2.70.0050.0309.38
5.2.60.0070.0309.34
5.2.50.0050.0339.30
5.2.40.0040.0299.28
5.2.30.0030.0319.25
5.2.20.0050.0289.25
5.2.10.0040.0299.17
5.2.00.0050.0309.03
5.1.60.0040.0288.32
5.1.50.0050.0238.31
5.1.40.0020.0268.29
5.1.30.0040.0268.64
5.1.20.0040.0278.66
5.1.10.0030.0278.38
5.1.00.0060.0248.39
5.0.50.0030.0216.86
5.0.40.0030.0206.71
5.0.30.0010.0336.54
5.0.20.0030.0196.50
5.0.10.0020.0216.48
5.0.00.0050.0296.47
4.4.90.0020.0164.78
4.4.80.0010.0174.75
4.4.70.0030.0164.75
4.4.60.0030.0154.75
4.4.50.0030.0154.77
4.4.40.0020.0254.71
4.4.30.0010.0214.76
4.4.20.0020.0164.84
4.4.10.0030.0154.85
4.4.00.0020.0264.76
4.3.110.0020.0174.66
4.3.100.0010.0164.66
4.3.90.0010.0164.64
4.3.80.0020.0254.58
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0030.0154.63
4.3.40.0020.0294.53
4.3.30.0020.0163.28
4.3.20.0030.0153.25
4.3.10.0020.0163.21
4.3.00.0100.0307.00

preferences:
52.54 ms | 401 KiB | 5 Q