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 $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)
7.4.10.0070.01816.86
7.4.00.0090.01015.86
7.3.130.0160.00516.66
7.3.120.0100.01015.83
7.3.110.0050.01415.55
7.3.100.0130.00915.80
7.3.90.0090.00815.77
7.3.80.0100.00815.74
7.3.70.0130.00615.82
7.3.60.0090.00915.70
7.3.50.0100.00515.80
7.3.40.0090.00815.74
7.3.30.0080.01015.73
7.3.20.0110.01117.71
7.3.10.0100.00717.37
7.3.00.0100.00816.64
7.2.260.0060.01717.10
7.2.250.0080.02016.83
7.2.240.0090.01416.02
7.2.230.0100.01216.16
7.2.220.0100.01016.15
7.2.210.0090.01216.22
7.2.200.0120.00816.05
7.2.190.0140.00916.02
7.2.180.0110.01515.94
7.2.170.0120.00816.05
7.2.160.0110.00816.14
7.2.150.0150.00717.84
7.2.140.0170.01017.02
7.2.130.0080.00817.68
7.2.120.0100.00917.68
7.2.110.0110.00917.69
7.2.100.0170.00717.19
7.2.90.0110.00517.73
7.2.80.0070.01117.66
7.2.70.0100.01017.71
7.2.60.0260.00817.08
7.2.50.0330.00715.75
7.2.40.0390.00917.71
7.2.30.0320.00917.68
7.2.20.0350.00617.85
7.2.10.0370.01017.30
7.2.00.0240.00818.10
7.1.330.0120.00816.02
7.1.320.0390.00815.95
7.1.310.3690.00815.94
7.1.300.0090.00815.84
7.1.290.0900.00815.84
7.1.280.0260.01016.89
7.1.270.0100.01216.62
7.1.260.0260.00715.89
7.1.250.0080.00916.53
7.1.240.0180.00317.72
7.1.230.0840.00415.88
7.1.220.0130.01317.70
7.1.210.0210.01017.46
7.1.200.0220.00714.49
7.1.190.0130.00813.13
7.1.180.0090.00913.13
7.1.170.0150.00413.13
7.1.160.0750.01016.29
7.1.150.0490.01617.27
7.1.140.0570.00816.46
7.1.130.0630.00817.46
7.1.120.1170.00816.49
7.1.110.0600.00314.54
7.1.100.0530.00716.88
7.1.90.0550.00717.04
7.1.80.0600.00816.13
7.1.70.0330.00816.20
7.1.60.0430.01523.52
7.1.50.0510.01021.08
7.1.40.0590.01122.84
7.1.30.0600.01025.16
7.1.20.0600.00623.07
7.1.10.0470.00513.98
7.1.00.0350.03018.36
7.0.330.0090.01517.11
7.0.320.0240.00715.54
7.0.310.0570.01415.50
7.0.300.0190.00817.39
7.0.290.0930.00816.10
7.0.280.0430.00415.43
7.0.270.0500.01316.14
7.0.260.0510.01016.93
7.0.250.0610.01215.69
7.0.240.0700.00614.52
7.0.230.0570.00816.43
7.0.220.0710.00815.68
7.0.210.0470.00616.13
7.0.200.0610.00715.09
7.0.190.0890.01215.30
7.0.180.0430.01014.99
7.0.170.0550.00715.99
7.0.160.0570.00716.00
7.0.150.0490.00915.06
7.0.140.0310.03317.49
7.0.130.0480.00815.16
7.0.120.0580.03016.75
7.0.110.0470.00715.97
7.0.100.0770.00713.88
7.0.90.0680.00715.09
7.0.80.0630.00615.13
7.0.70.0450.00915.97
7.0.60.0490.02717.18
7.0.50.0500.02915.29
7.0.40.0340.01816.15
7.0.30.0540.02716.11
7.0.20.0480.03416.81
7.0.10.0400.03316.83
7.0.00.0370.01716.02
5.6.400.0140.00816.03
5.6.390.0200.00416.42
5.6.380.0200.00816.39
5.6.370.0230.00516.34
5.6.360.0130.01016.36
5.6.350.0110.01416.19
5.6.340.0210.00013.13
5.6.330.0000.00813.13
5.6.320.0090.00913.13
5.6.310.0180.01016.29
5.6.300.0130.03216.96
5.6.290.0180.03218.46
5.6.280.0140.04319.54
5.6.270.0180.03018.55
5.6.260.0180.03118.61
5.6.250.0160.03118.77
5.6.240.0140.03318.58
5.6.230.0170.02818.61
5.6.220.0130.03218.56
5.6.210.0160.04219.36
5.6.200.0110.05018.58
5.6.190.0100.03719.31
5.6.180.0210.03319.24
5.6.170.0230.04519.37
5.6.160.0140.04519.40
5.6.150.0120.04718.53
5.6.140.0120.03418.53
5.6.130.0090.04618.51
5.6.120.0090.05019.55
5.6.110.0120.03618.41
5.6.100.0130.04719.41
5.6.90.0120.04718.43
5.6.80.0160.04219.06
5.6.70.0110.03618.17
5.6.60.0130.02818.20
5.6.50.0130.03018.33
5.6.40.0150.02918.24
5.6.30.0110.03518.19
5.6.20.0140.03218.25
5.6.10.0080.03818.24
5.6.00.0150.02716.76
5.5.380.0130.07517.58
5.5.370.0190.04817.63
5.5.360.0110.05717.53
5.5.350.0230.06419.15
5.5.340.0070.04818.04
5.5.330.0090.07019.27
5.5.320.0390.05219.22
5.5.310.0230.04919.24
5.5.300.0060.05218.07
5.5.290.0100.08018.02
5.5.280.0110.05019.43
5.5.270.0070.07119.63
5.5.260.0090.05219.64
5.5.250.0060.04919.41
5.5.240.0180.05318.81
5.5.230.0200.04917.26
5.5.220.0100.05617.45
5.5.210.0150.05017.44
5.5.200.0230.05117.54
5.5.190.0110.05417.45
5.5.180.0200.06317.41
5.5.160.0120.05217.46
5.5.150.0170.04817.41
5.5.140.0120.06517.53
5.5.130.0180.06717.47
5.5.120.0110.05317.55
5.5.110.0140.05117.42
5.5.100.0100.05417.39
5.5.90.0110.07117.44
5.5.80.0210.05117.42
5.5.70.0200.04617.44
5.5.60.0120.05017.15
5.5.50.0100.05317.16
5.5.40.0140.04917.45
5.5.30.0100.05317.28
5.5.20.0090.05517.16
5.5.10.0100.05317.41
5.5.00.0140.05117.43
5.4.450.0120.05419.55
5.4.440.0130.06519.66
5.4.430.0120.04219.37
5.4.420.0090.04519.59
5.4.410.0060.07019.32
5.4.400.0100.04619.21
5.4.390.0120.06119.19
5.4.380.0100.04719.21
5.4.370.0090.04419.30
5.4.360.0110.06319.20
5.4.350.0070.05519.21
5.4.340.0090.05919.29
5.4.320.0110.06519.22
5.4.310.0100.04619.09
5.4.300.0100.04819.21
5.4.290.0150.05419.23
5.4.280.0130.05919.10
5.4.270.0100.05119.25
5.4.260.0110.04519.05
5.4.250.0100.06019.04
5.4.240.0120.04219.29
5.4.230.0120.05019.12
5.4.220.0070.04919.13
5.4.210.0160.05619.19
5.4.200.0160.04919.22
5.4.190.0100.06419.16
5.4.180.0110.05119.26
5.4.170.0090.06219.28
5.4.160.0090.06419.20
5.4.150.0090.06619.08
5.4.140.0060.06416.58
5.4.130.0080.04616.46
5.4.120.0060.04716.47
5.4.110.0090.06816.48
5.4.100.0110.04416.54
5.4.90.0080.06216.59
5.4.80.0100.04016.62
5.4.70.0130.05716.54
5.4.60.0090.06116.54
5.4.50.0070.04416.57
5.4.40.0090.05116.62
5.4.30.0080.05016.68
5.4.20.0090.05316.60
5.4.10.0100.05016.59
5.4.00.0100.05415.98
5.3.290.0070.04814.69
5.3.280.0130.05714.64
5.3.270.0070.06214.66
5.3.260.0120.06214.66
5.3.250.0160.05114.56
5.3.240.0120.05614.62
5.3.230.0130.06214.39
5.3.220.0080.05714.48
5.3.210.0100.06314.56
5.3.200.0070.05714.55
5.3.190.0100.04314.55
5.3.180.0140.04314.51
5.3.170.0080.04814.45
5.3.160.0060.04614.70
5.3.150.0060.04514.47
5.3.140.0070.04914.60
5.3.130.0090.06514.60
5.3.120.0130.04214.59
5.3.110.0060.04714.63
5.3.100.0100.05914.13
5.3.90.0070.04713.93
5.3.80.0070.04813.90
5.3.70.0090.05914.01
5.3.60.0120.05514.01
5.3.50.0140.05914.03
5.3.40.0100.06714.01
5.3.30.0090.05113.83
5.3.20.0040.06113.73
5.3.10.0090.03913.61
5.3.00.0100.03913.69
5.2.170.0080.04211.22
5.2.160.0040.05011.14
5.2.150.0070.04611.15
5.2.140.0080.03711.07
5.2.130.0080.03511.06
5.2.120.0050.03711.09
5.2.110.0090.03411.18
5.2.100.0050.04911.11
5.2.90.0070.04810.95
5.2.80.0090.04511.11
5.2.70.0100.04711.10
5.2.60.0080.03811.11
5.2.50.0040.04611.05
5.2.40.0050.03511.02
5.2.30.0060.04411.09
5.2.20.0090.04410.98
5.2.10.0110.03210.86
5.2.00.0100.04110.86
5.1.60.0070.04310.00
5.1.50.0070.03210.11
5.1.40.0050.03710.05
5.1.30.0090.03410.44
5.1.20.0070.03310.36
5.1.10.0080.03210.09
5.1.00.0060.04510.19
5.0.50.0060.0308.78
5.0.40.0040.0378.70
5.0.30.0030.0408.70
5.0.20.0080.0278.70
5.0.10.0040.0278.70
5.0.00.0010.0378.70
4.4.90.0050.0268.70
4.4.80.0040.0198.70
4.4.70.0040.0208.70
4.4.60.0020.0228.70
4.4.50.0020.0298.70
4.4.40.0030.0328.70
4.4.30.0050.0258.70
4.4.20.0010.0208.70
4.4.10.0040.0198.70
4.4.00.0010.0478.70
4.3.110.0010.0288.70
4.3.100.0030.0288.70
4.3.90.0020.0198.70
4.3.80.0040.0288.70
4.3.70.0030.0278.70
4.3.60.0040.0238.70
4.3.50.0030.0188.70
4.3.40.0020.0308.70
4.3.30.0010.0288.70
4.3.20.0020.0188.70
4.3.10.0020.0288.70
4.3.00.0030.0178.70

preferences:
39.83 ms | 400 KiB | 5 Q