3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent> naiya </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.0140.00318.93
8.3.50.0110.00722.14
8.3.40.0140.00319.08
8.3.30.0110.01119.35
8.3.20.0050.00220.74
8.3.10.0050.00323.82
8.3.00.0050.00319.63
8.2.180.0060.00918.48
8.2.170.0120.00322.96
8.2.160.0070.00720.70
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00422.61
8.2.110.0080.00019.51
8.2.100.0090.00318.00
8.2.90.0030.00619.55
8.2.80.0000.00817.98
8.2.70.0030.00718.00
8.2.60.0030.00518.40
8.2.50.0090.00018.07
8.2.40.0000.00818.59
8.2.30.0050.00218.51
8.2.20.0040.00418.08
8.2.10.0000.00718.48
8.2.00.0040.00418.27
8.1.280.0030.01225.92
8.1.270.0040.00422.56
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00622.44
8.1.230.0000.01118.10
8.1.220.0080.00018.16
8.1.210.0030.00618.77
8.1.200.0060.00317.86
8.1.190.0000.00817.63
8.1.180.0030.00518.10
8.1.170.0060.00320.67
8.1.160.0000.00722.39
8.1.150.0000.00719.27
8.1.140.0070.00017.75
8.1.130.0000.00818.14
8.1.120.0040.00417.94
8.1.110.0020.00517.82
8.1.100.0040.00417.80
8.1.90.0000.00817.95
8.1.80.0000.00717.89
8.1.70.0050.00317.91
8.1.60.0060.00617.92
8.1.50.0040.00417.88
8.1.40.0040.00417.97
8.1.30.0000.00918.03
8.1.20.0060.00317.95
8.1.10.0000.00817.91
8.1.00.0060.00317.86
8.0.300.0040.00418.77
8.0.290.0050.00317.00
8.0.280.0000.00718.84
8.0.270.0050.00317.63
8.0.260.0000.00717.59
8.0.250.0000.00717.39
8.0.240.0040.00417.40
8.0.230.0070.00017.28
8.0.220.0070.00017.36
8.0.210.0000.00717.09
8.0.200.0030.00317.40
8.0.190.0000.00717.29
8.0.180.0070.00017.22
8.0.170.0030.00517.41
8.0.160.0050.00217.25
8.0.150.0000.00717.14
8.0.140.0040.00417.13
8.0.130.0000.00613.78
8.0.120.0030.00517.07
8.0.110.0020.00517.14
8.0.100.0040.00417.23
8.0.90.0070.00017.24
8.0.80.0090.00617.32
8.0.70.0000.00717.10
8.0.60.0030.00517.20
8.0.50.0040.00417.36
8.0.30.0140.00517.37
8.0.20.0080.01217.40
8.0.10.0040.00417.25
8.0.00.0120.00517.16
7.4.330.0030.00315.02
7.4.320.0000.00616.90
7.4.300.0000.00617.04
7.4.290.0030.00316.96
7.4.280.0060.00316.96
7.4.270.0000.00616.97
7.4.260.0040.00417.07
7.4.250.0060.00316.81
7.4.240.0040.00316.98
7.4.230.0030.00317.00
7.4.220.0090.00917.00
7.4.210.0110.00416.89
7.4.200.0000.00717.04
7.4.160.0130.00416.87
7.4.150.0210.00417.40
7.4.140.0130.00517.86
7.4.130.0110.01116.96
7.4.120.0070.01116.86
7.4.110.0070.01916.75
7.4.100.0070.01117.06
7.4.90.0070.01016.82
7.4.80.0070.01719.39
7.4.70.0130.00616.84
7.4.60.0100.01417.02
7.4.50.0040.00416.95
7.4.40.0120.01216.93
7.4.30.0090.00616.92
7.4.00.0110.00414.98
7.3.330.0070.00013.32
7.3.320.0050.00013.50
7.3.310.0000.00816.43
7.3.300.0030.00316.61
7.3.290.0070.00916.57
7.3.280.0100.00816.63
7.3.270.0090.01617.40
7.3.260.0090.00916.81
7.3.250.0100.00616.68
7.3.240.0080.00916.98
7.3.230.0070.01016.58
7.3.210.0160.00316.58
7.3.200.0130.00319.39
7.3.190.0100.01316.59
7.3.180.0090.00616.92
7.3.170.0100.01016.59
7.3.160.0060.00916.87
7.2.330.0090.00917.26
7.2.320.0100.00717.25
7.2.310.0130.01117.15
7.2.300.0030.01316.88
7.2.290.0060.01616.83
7.2.00.0130.00719.88
7.1.100.0000.01118.37
7.1.70.0050.00217.41
7.1.60.0030.02119.32
7.1.50.0320.01035.06
7.1.00.0030.07722.70
7.0.200.0050.00316.91
7.0.140.0100.07022.24
7.0.100.0070.08020.07
7.0.90.0230.08020.02
7.0.80.0130.08320.19
7.0.70.0070.07720.08
7.0.60.0300.04320.04
7.0.50.0070.08320.46
7.0.40.0100.03720.22
7.0.30.0130.08720.26
7.0.20.0070.08020.17
7.0.10.0070.08320.18
7.0.00.0030.08320.19
5.6.280.0070.07021.26
5.6.250.0100.08020.70
5.6.240.0170.07020.88
5.6.230.0070.08020.72
5.6.220.0130.07720.64
5.6.210.0070.04720.65
5.6.200.0100.05021.08
5.6.190.0100.08021.17
5.6.180.0030.08021.07
5.6.170.0130.07321.10
5.6.160.0070.08321.21
5.6.150.0100.08021.15
5.6.140.0100.07721.15
5.6.130.0030.09021.07
5.6.120.0170.06721.10
5.6.110.0000.08721.09
5.6.100.0170.04021.14
5.6.90.0130.08721.09
5.6.80.0100.07720.52
5.6.70.0000.07020.57
5.6.60.0100.06720.58
5.6.50.0100.07720.54
5.6.40.0030.07320.57
5.6.30.0070.05020.53
5.6.20.0130.07020.56
5.6.10.0170.07320.54
5.6.00.0030.08020.49
5.5.380.0070.07320.49
5.5.370.0070.08720.44
5.5.360.0100.05320.59
5.5.350.0100.03720.45
5.5.340.0100.07020.90
5.5.330.0000.06721.04
5.5.320.0070.07320.90
5.5.310.0130.07321.02
5.5.300.0100.07720.90
5.5.290.0100.08320.88
5.5.280.0070.08320.91
5.5.270.0100.08020.95
5.5.260.0130.08021.00
5.5.250.0030.08720.77
5.5.240.0100.07720.35
5.5.230.0070.08020.29
5.5.220.0030.08320.24
5.5.210.0230.06720.38
5.5.200.0100.05020.29
5.5.190.0070.08020.33
5.5.180.0070.08720.21
5.5.160.0100.07320.29
5.5.150.0070.05320.39
5.5.140.0070.08020.21
5.5.130.0030.06720.29
5.5.120.0130.07720.34
5.5.110.0130.06720.30
5.5.100.0100.07320.24
5.5.90.0030.08720.26
5.5.80.0130.08020.14
5.5.70.0030.07720.16
5.5.60.0070.07020.25
5.5.50.0070.07720.18
5.5.40.0070.07320.22
5.5.30.0170.07320.10
5.5.20.0030.06720.23
5.5.10.0200.06720.12
5.5.00.0030.08320.13
5.4.450.0070.08019.36
5.4.440.0100.07719.64
5.4.430.0000.08719.56
5.4.420.0100.06019.56
5.4.410.0030.08319.46
5.4.400.0070.07719.29
5.4.390.0070.07319.23
5.4.380.0170.06319.18
5.4.370.0030.08319.25
5.4.360.0030.07719.20
5.4.350.0070.05719.09
5.4.340.0170.06319.19
5.4.320.0170.06719.24
5.4.310.0100.06719.27
5.4.300.0000.08019.25
5.4.290.0100.07318.99
5.4.280.0030.07019.02
5.4.270.0070.08019.19
5.4.260.0070.07719.28
5.4.250.0070.07318.99
5.4.240.0030.08019.24
5.4.230.0070.07319.23
5.4.220.0100.08019.40
5.4.210.0130.07019.09
5.4.200.0170.06319.28
5.4.190.0170.06319.23
5.4.180.0170.05319.01
5.4.170.0030.07319.25
5.4.160.0070.08019.22
5.4.150.0070.07719.42
5.4.140.0100.06716.34
5.4.130.0030.04716.47
5.4.120.0070.07716.34
5.4.110.0030.07316.45
5.4.100.0070.07316.59
5.4.90.0030.06016.52
5.4.80.0100.05016.41
5.4.70.0100.07016.51
5.4.60.0070.06716.51
5.4.50.0130.07316.41
5.4.40.0130.04716.50
5.4.30.0070.06316.43
5.4.20.0100.04716.58
5.4.10.0200.05716.43
5.4.00.0130.06315.86
5.3.290.0170.07014.89
5.3.280.0070.07714.80
5.3.270.0170.06714.76
5.3.260.0070.08014.80
5.3.250.0070.07014.75
5.3.240.0100.07014.75
5.3.230.0070.06714.80
5.3.220.0070.06714.78
5.3.210.0000.08314.71
5.3.200.0070.07714.68
5.3.190.0100.07714.59
5.3.180.0130.06714.76
5.3.170.0100.07714.70
5.3.160.0070.08014.69
5.3.150.0030.07714.70
5.3.140.0030.08314.68
5.3.130.0030.08014.67
5.3.120.0030.07714.67
5.3.110.0030.05314.58
5.3.100.0230.06714.16
5.3.90.0030.07314.14
5.3.80.0100.04314.23
5.3.70.0100.07314.21
5.3.60.0100.07714.17
5.3.50.0100.07014.09
5.3.40.0070.07314.09
5.3.30.0130.06314.06
5.3.20.0000.07713.85
5.3.10.0030.06313.78
5.3.00.0130.07313.79
5.2.170.0000.07011.20
5.2.160.0100.04311.17
5.2.150.0100.04711.27
5.2.140.0030.03711.20
5.2.130.0030.06311.34
5.2.120.0000.06311.37
5.2.110.0000.06711.36
5.2.100.0070.03311.16
5.2.90.0030.04711.39
5.2.80.0000.06711.23
5.2.70.0100.05011.29
5.2.60.0100.06011.10
5.2.50.0000.05711.24
5.2.40.0070.06311.24
5.2.30.0000.06711.25
5.2.20.0070.05711.10
5.2.10.0030.06011.05
5.2.00.0200.04710.98
5.1.60.0070.05310.14
5.1.50.0100.04710.25
5.1.40.0070.04010.25
5.1.30.0130.03710.55
5.1.20.0030.05710.55
5.1.10.0030.05310.32
5.1.00.0100.04010.33
5.0.50.0000.0438.80
5.0.40.0030.0438.60
5.0.30.0000.0638.48
5.0.20.0030.0438.36
5.0.10.0070.0408.47
5.0.00.0230.0378.38
4.4.90.0070.0338.14
4.4.80.0030.0338.14
4.4.70.0030.0338.14
4.4.60.0000.0378.14
4.4.50.0000.0378.14
4.4.40.0030.0538.14
4.4.30.0070.0378.14
4.4.20.0030.0338.14
4.4.10.0030.0308.14
4.4.00.0000.0578.14
4.3.110.0030.0208.14
4.3.100.0030.0378.14
4.3.90.0030.0338.14
4.3.80.0030.0508.14
4.3.70.0030.0278.14
4.3.60.0000.0338.14
4.3.50.0000.0338.14
4.3.40.0070.0538.14
4.3.30.0000.0378.14
4.3.20.0100.0178.14
4.3.10.0000.0378.14
4.3.00.0000.0338.14

preferences:
52.51 ms | 401 KiB | 5 Q