3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr='<mainGroup> <groupHeading type="heading">This is a sample heading</groupHeading> <group type="groupType1"> <title>Title1</title> <date when="0001"></date> </group> <group type="groupType1"> <title>Title2</title> <date when="0002"></date> </group> <group type="groupType2"> <title>Title3</title> <date when="0003"></date> </group> </mainGroup>'; $xml=simplexml_load_file($xmlstr); // now loop through all <groupheading>, we use an xpath-query... foreach ($xml->xpath("//groupheading") as $gh) { echo $gh; } ?>

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.0060.00918.68
8.3.50.0090.01122.05
8.3.40.0120.00318.84
8.3.30.0080.01218.79
8.3.20.0050.00318.89
8.3.10.0080.00019.59
8.3.00.0060.00323.73
8.2.180.0110.00717.13
8.2.170.0140.00722.96
8.2.160.0100.00320.48
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0080.00021.25
8.2.110.0090.00020.41
8.2.100.0080.00417.85
8.2.90.0040.00418.16
8.2.80.0040.00418.04
8.2.70.0040.00417.50
8.2.60.0060.00318.03
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0040.00421.36
8.2.20.0040.00417.78
8.2.10.0060.00317.98
8.2.00.0040.00417.85
8.1.280.0130.00625.92
8.1.270.0040.00423.99
8.1.260.0150.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.24
8.1.230.0110.00021.04
8.1.220.0000.00817.74
8.1.210.0040.00418.85
8.1.200.0050.00517.35
8.1.190.0050.00317.41
8.1.180.0050.00318.10
8.1.170.0060.00318.66
8.1.160.0080.00018.93
8.1.150.0040.00418.71
8.1.140.0040.00417.46
8.1.130.0030.00317.86
8.1.120.0000.00717.55
8.1.110.0040.00417.46
8.1.100.0000.00817.34
8.1.90.0000.00717.50
8.1.80.0040.00417.55
8.1.70.0030.00317.50
8.1.60.0080.00017.58
8.1.50.0080.00017.52
8.1.40.0000.00817.64
8.1.30.0000.00817.80
8.1.20.0090.00017.78
8.1.10.0060.00317.65
8.1.00.0090.00017.63
8.0.300.0040.00420.16
8.0.290.0070.00017.05
8.0.280.0030.00318.42
8.0.270.0030.00317.23
8.0.260.0080.00016.96
8.0.250.0070.00017.07
8.0.240.0060.00316.87
8.0.230.0030.00317.05
8.0.220.0030.00517.02
8.0.210.0000.00716.90
8.0.200.0000.00817.09
8.0.190.0040.00416.88
8.0.180.0090.00016.88
8.0.170.0070.00017.05
8.0.160.0040.00416.85
8.0.150.0040.00416.78
8.0.140.0070.00016.96
8.0.130.0050.00013.30
8.0.120.0000.00716.96
8.0.110.0040.00416.93
8.0.100.0040.00416.73
8.0.90.0070.00017.04
8.0.80.0110.00816.95
8.0.70.0050.00317.04
8.0.60.0050.00316.93
8.0.50.0090.00017.09
8.0.30.0090.01016.93
8.0.20.0100.01017.40
8.0.10.0000.00817.05
8.0.00.0120.00616.73
7.4.330.0030.00314.96
7.4.320.0030.00316.66
7.4.300.0000.00616.55
7.4.290.0000.00716.71
7.4.280.0000.00816.69
7.4.270.0040.00416.75
7.4.260.0030.00313.43
7.4.250.0040.00416.43
7.4.240.0040.00416.57
7.4.230.0050.00216.46
7.4.220.0130.00316.62
7.4.210.0080.01016.71
7.4.200.0030.00316.60
7.4.190.0000.00716.71
7.4.160.0150.00916.61
7.4.150.0030.01917.40
7.4.140.0090.01217.86
7.4.130.0050.01416.55
7.4.120.0110.00916.74
7.4.110.0140.00316.70
7.4.100.0120.00616.59
7.4.90.0060.01216.59
7.4.80.0130.00419.39
7.4.70.0130.00716.54
7.4.60.0040.01516.59
7.4.50.0030.00716.32
7.4.40.0040.01122.52
7.4.30.0060.01016.60
7.4.00.0070.01015.01
7.3.330.0000.00513.31
7.3.320.0000.00513.28
7.3.310.0030.00316.24
7.3.300.0000.00716.40
7.3.290.0150.00016.21
7.3.280.0060.00916.33
7.3.270.0060.01217.40
7.3.260.0100.01018.24
7.3.250.0090.01016.30
7.3.240.0160.00016.41
7.3.230.0060.01016.39
7.3.210.0100.00716.36
7.3.200.0100.00719.39
7.3.190.0160.00716.73
7.3.180.0080.01416.68
7.3.170.0090.00616.44
7.3.160.0100.01016.67
7.3.120.0100.00714.72
7.2.330.0090.00916.55
7.2.320.0130.00916.69
7.2.310.0100.01316.60
7.2.300.0100.00616.56
7.2.290.0030.01916.67
7.2.60.0030.01316.79
7.2.00.0000.01619.45
7.1.200.0030.00515.75
7.1.100.0040.01118.08
7.1.70.0000.00917.25
7.1.60.0130.00619.40
7.1.50.0230.01334.89
7.1.00.0000.03722.64
7.0.200.0060.00316.63
7.0.140.0100.07021.96
7.0.60.0030.06720.03
7.0.50.0030.08017.90
7.0.40.0030.04320.32
7.0.30.0230.05320.18
7.0.20.0330.06020.17
7.0.10.0200.04020.13
7.0.00.0100.08720.23
5.6.280.0070.07021.10
5.6.210.0000.06720.80
5.6.200.0100.07718.20
5.6.190.0070.08020.59
5.6.180.0230.06320.47
5.6.170.0230.07720.57
5.6.160.0070.08720.58
5.6.150.0030.07718.15
5.6.140.0070.07318.19
5.6.130.0100.05018.25
5.6.120.0100.08321.04
5.6.110.0070.09021.04
5.6.100.0000.04321.02
5.6.90.0030.07021.14
5.6.80.0030.04020.39
5.6.70.3500.03020.43
5.5.350.0300.07020.44
5.5.340.0030.04718.02
5.5.330.0070.04020.36
5.5.320.0200.07020.27
5.5.310.0300.06720.35
5.5.300.0070.03718.05
5.5.290.0100.07718.05
5.5.280.0030.07020.80
5.5.270.0070.08720.77
5.5.260.0130.07720.82
5.5.250.0100.06020.83
5.5.240.0100.08020.41
5.4.450.0070.03719.33
5.4.440.1570.05719.62
5.4.430.1900.04019.37
5.4.420.1670.04319.34
5.4.410.1530.03719.40
5.4.400.2100.04019.32
5.4.390.1870.04319.20
5.4.380.2100.03719.33
5.4.370.0000.06019.16
5.4.360.0030.04319.08
5.4.350.0030.03719.05
5.4.340.1000.04019.07
5.4.320.0030.03719.09
5.4.310.0000.04719.29
5.4.300.0070.08318.93
5.4.290.0070.04719.29
5.4.280.0030.04319.15
5.4.270.0330.04018.93
5.4.260.0030.04719.02
5.4.250.0000.04019.06
5.4.240.0030.03719.03
5.4.230.1600.02719.34
5.4.220.1770.04319.15
5.4.210.1670.03719.08
5.4.200.0000.04719.08
5.4.190.0070.03319.15
5.4.180.0000.04019.18
5.4.170.0300.05319.07
5.4.160.0200.04719.13
5.4.150.0230.05319.26
5.4.140.0170.04016.50
5.4.130.0170.03716.71
5.4.120.0170.03016.56
5.4.110.0200.03316.61
5.4.100.0200.06316.30
5.4.90.0130.06716.61
5.4.80.0070.07716.50
5.4.70.0130.03316.59
5.4.60.0200.03016.57
5.4.50.0070.03716.36
5.4.40.0030.04016.51
5.4.30.1400.03316.50
5.4.20.0570.05016.48
5.4.10.0070.03316.39
5.4.00.0370.04316.02
5.3.290.0030.04014.75
5.3.280.0030.03714.57
5.3.270.0100.06014.70
5.3.260.1700.03714.60
5.3.250.0070.04314.58
5.3.240.0000.07714.79
5.3.230.0770.04314.77
5.3.220.1930.04314.73
5.3.210.0030.04714.55
5.3.200.0100.07314.75
5.3.190.0030.03714.55
5.3.180.1530.04714.55
5.3.170.1730.03714.74
5.3.160.0070.04714.73
5.3.150.0070.08014.55
5.3.140.0030.04714.60
5.3.130.1370.03314.61
5.3.120.0070.03314.54
5.3.110.0030.06314.54
5.3.100.0030.03714.12
5.3.90.0030.03714.20
5.3.80.0000.06714.00
5.3.70.1330.03714.01
5.3.60.1900.03713.98
5.3.50.1800.03014.09
5.3.40.1870.04013.93
5.3.30.1830.03713.98
5.3.20.1770.03713.67
5.3.10.1700.03713.84
5.3.00.1730.03713.72
5.2.170.0070.02711.27
5.2.160.0030.03011.10
5.2.150.0030.03711.13
5.2.140.0000.03311.31
5.2.130.1230.02311.08
5.2.120.1570.03311.08
5.2.110.0030.04311.08
5.2.100.0070.03011.07
5.2.90.0570.03311.08
5.2.80.1370.03011.22
5.2.70.1400.04711.04
5.2.60.0570.02711.14
5.2.50.0030.05711.02
5.2.40.0070.04011.08
5.2.30.0070.05311.11
5.2.20.0300.03010.94
5.2.10.0170.04711.05
5.2.00.0130.03310.66
5.1.60.0270.04710.05
5.1.50.0100.03310.16
5.1.40.0100.0309.92
5.1.30.0130.03010.41
5.1.20.0170.05010.28
5.1.10.0070.03310.03
5.1.00.0030.04310.11
5.0.50.0070.0438.60
5.0.40.0030.0308.48
5.0.30.0000.0408.28
5.0.20.0070.0278.20
5.0.10.0100.0238.26
5.0.00.0100.0278.12
4.4.90.0000.0238.01
4.4.80.0030.0138.01
4.4.70.0030.0338.01
4.4.60.0000.0178.01
4.4.50.0000.0208.01
4.4.40.0030.0538.01
4.4.30.0000.0208.01
4.4.20.0000.0208.01
4.4.10.0130.0278.01
4.4.00.0000.0278.01
4.3.110.0000.0338.01
4.3.100.0000.0208.01
4.3.90.0030.0138.01
4.3.80.0000.0238.01
4.3.70.0030.0338.01
4.3.60.0000.0178.01
4.3.50.0330.0178.01
4.3.40.0600.0238.01
4.3.30.0330.0208.01
4.3.20.0030.0138.01
4.3.10.0000.0208.01
4.3.00.0000.0208.01

preferences:
42.88 ms | 401 KiB | 5 Q