3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOF <people> <person name="Person 1"> <child/> <child/> <child/> </person> <person name="Person 2"> <child/> <child/> <child/> <child/> <child/> </person> </people> EOF; $elem = new SimpleXMLElement($xml); foreach ($elem as $person) { //printf("%s has got %d children.\n", $person['name'], $person->count()); printf("%s has got %d children.\n", $person['name'], count($person)); } ?>

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.0160.00318.55
8.3.50.0150.00622.12
8.3.40.0110.00419.01
8.3.30.0100.00319.38
8.3.20.0000.00820.59
8.3.10.0040.00421.70
8.3.00.0070.00419.27
8.2.180.0110.01418.54
8.2.170.0140.00422.96
8.2.160.0130.00720.48
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00020.02
8.2.110.0000.01021.35
8.2.100.0050.00517.88
8.2.90.0080.00017.75
8.2.80.0000.00918.18
8.2.70.0080.00017.90
8.2.60.0070.00418.22
8.2.50.0040.00418.10
8.2.40.0040.00419.45
8.2.30.0040.00419.39
8.2.20.0050.00217.91
8.2.10.0000.00718.32
8.2.00.0030.00518.05
8.1.280.0110.00425.92
8.1.270.0080.00818.99
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00322.77
8.1.230.0120.00021.09
8.1.220.0080.00017.93
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0080.00017.35
8.1.180.0050.00318.10
8.1.170.0040.00418.84
8.1.160.0000.00719.12
8.1.150.0000.00719.06
8.1.140.0000.00717.68
8.1.130.0000.00718.02
8.1.120.0000.00717.63
8.1.110.0000.00817.59
8.1.100.0040.00417.68
8.1.90.0040.00417.70
8.1.80.0050.00317.68
8.1.70.0000.00717.73
8.1.60.0030.00617.71
8.1.50.0000.00817.62
8.1.40.0000.00817.63
8.1.30.0040.00417.77
8.1.20.0000.00717.82
8.1.10.0080.00017.69
8.1.00.0000.00817.75
8.0.300.0000.00720.15
8.0.290.0060.00316.88
8.0.280.0040.00418.67
8.0.270.0030.00317.37
8.0.260.0000.00817.37
8.0.250.0000.00717.16
8.0.240.0060.00317.24
8.0.230.0030.00317.13
8.0.220.0000.00717.23
8.0.210.0030.00317.05
8.0.200.0040.00417.16
8.0.190.0040.00417.30
8.0.180.0040.00417.22
8.0.170.0070.00017.18
8.0.160.0000.00717.21
8.0.150.0040.00416.98
8.0.140.0050.00317.18
8.0.130.0070.00013.54
8.0.120.0040.00417.16
8.0.110.0030.00617.10
8.0.100.0060.00317.09
8.0.90.0040.00417.11
8.0.80.0210.00017.03
8.0.70.0000.00717.18
8.0.60.0080.00017.14
8.0.50.0040.00417.24
8.0.30.0110.01017.50
8.0.20.0120.00617.51
8.0.10.0000.00717.38
8.0.00.0170.00516.93
7.4.330.0060.00015.03
7.4.320.0030.00316.77
7.4.300.0000.00616.73
7.4.290.0030.00316.68
7.4.280.0000.00716.68
7.4.270.0070.00016.81
7.4.260.0060.00316.76
7.4.250.0040.00416.67
7.4.240.0020.00616.77
7.4.230.0040.00416.83
7.4.220.0060.01316.82
7.4.210.0030.01716.87
7.4.200.0070.00016.58
7.4.160.0070.01016.78
7.4.150.0070.01017.40
7.4.140.0090.01017.86
7.4.130.0080.00916.68
7.4.120.0090.01116.73
7.4.110.0120.00616.74
7.4.100.0090.00916.79
7.4.90.0100.00716.87
7.4.80.0110.00619.39
7.4.70.0100.01316.71
7.4.60.0040.01316.71
7.4.50.0000.00616.67
7.4.40.0150.00316.86
7.4.30.0140.00916.89
7.4.00.0070.00715.20
7.3.330.0050.00013.50
7.3.320.0030.00213.30
7.3.310.0040.00416.68
7.3.300.0030.00316.52
7.3.290.0090.00816.54
7.3.280.0100.00716.54
7.3.270.0090.00817.40
7.3.260.0070.01016.71
7.3.250.0080.01016.74
7.3.240.0150.00716.59
7.3.230.0120.00916.68
7.3.210.0000.01716.64
7.3.200.0060.01119.39
7.3.190.0060.01116.69
7.3.180.0000.01616.55
7.3.170.0090.00916.70
7.3.160.0060.01016.67
7.2.330.0070.01116.98
7.2.320.0030.01416.59
7.2.310.0130.00316.74
7.2.300.0030.01616.93
7.2.290.0060.01116.75
7.2.00.0070.00719.65
7.1.200.0070.00715.85
7.1.100.0060.00818.27
7.1.70.0040.00417.25
7.1.60.0030.02119.22
7.1.50.0130.00717.17
7.1.00.0070.07322.44
7.0.200.0000.00816.88
7.0.140.0070.05322.15
7.0.60.0030.07019.89
7.0.50.0100.07717.98
7.0.40.0100.08320.12
7.0.30.0300.06720.14
7.0.20.0170.04020.32
7.0.10.0030.04320.40
7.0.00.0030.06020.14
5.6.280.0030.07321.13
5.6.210.0030.04020.55
5.6.200.0170.04018.29
5.6.190.0070.09020.52
5.6.180.0270.04720.74
5.6.170.0070.05020.59
5.6.160.0070.09020.46
5.6.150.0000.09018.34
5.6.140.0070.03318.25
5.6.130.0070.08318.24
5.6.120.0100.08021.01
5.6.110.0100.04721.19
5.6.100.0100.05321.00
5.6.90.0100.07721.21
5.6.80.0070.06020.59
5.5.350.0270.06020.47
5.5.340.0070.04318.11
5.5.330.0100.06720.43
5.5.320.0270.07720.36
5.5.310.0330.04720.38
5.5.300.0070.05718.01
5.5.290.0170.03318.10
5.5.280.0130.06320.93
5.5.270.0030.05721.00
5.5.260.0030.09321.05
5.5.250.0070.08020.82
5.5.240.0070.06720.23
5.4.450.0600.06319.55
5.4.440.0630.06019.30
5.4.430.0070.06019.36
5.4.420.0800.07019.34
5.4.410.0600.05019.33
5.4.400.0800.05019.30
5.4.390.0730.04719.02
5.4.380.0130.06018.70
5.4.370.0270.04318.73
5.4.360.0270.05018.60
5.4.350.0170.05718.54
5.4.340.0230.05018.74
5.4.320.0270.05018.70
5.4.310.0130.06018.73
5.4.300.0170.05718.64
5.4.290.0230.05318.77
5.4.280.0300.05018.75
5.4.270.0270.04718.74
5.4.260.0430.03718.64
5.4.250.0330.04718.69
5.4.240.0300.04718.76
5.4.230.0270.04718.58
5.4.220.0130.06718.58
5.4.210.0270.06318.81
5.4.200.0130.05716.72
5.4.190.0170.05718.71
5.4.180.0200.05318.75
5.4.170.0270.05018.67
5.4.160.0170.05718.74
5.4.150.0300.04318.66
5.4.140.0300.04316.23
5.4.130.0330.05716.39
5.4.120.0270.04716.34
5.4.110.0230.04716.38
5.4.100.0200.05016.15
5.4.90.0100.07316.24
5.4.80.0130.05716.34
5.4.70.0330.05016.36
5.4.60.0130.05716.36
5.4.50.0200.05716.35
5.4.40.0200.05316.38
5.4.30.0230.05716.16
5.4.20.0130.06016.20
5.4.10.0230.05016.35
5.4.00.0130.05715.57
5.3.290.0270.04714.65
5.3.280.0170.05314.80
5.3.270.0230.05014.71
5.3.260.0130.06314.70
5.3.250.0200.06314.78
5.3.240.0370.04014.74
5.3.230.0200.05314.63
5.3.220.0200.05314.55
5.3.210.0230.05314.67
5.3.200.0200.05314.79
5.3.190.0130.06714.57
5.3.180.0230.05314.79
5.3.170.0200.06014.60
5.3.160.0300.05014.63
5.3.150.0370.03714.59
5.3.140.0270.04714.67
5.3.130.0270.05714.78
5.3.120.0330.05314.65
5.3.110.0130.07014.78
5.3.100.0070.07014.16
5.3.90.0270.07014.02
5.3.80.0130.08014.02
5.3.70.0270.06714.16
5.3.60.0300.06314.11
5.3.50.0300.04314.04
5.3.40.0170.05314.09
5.3.30.0200.05313.97
5.3.20.0100.05713.87
5.3.10.0100.05713.69
5.3.00.0170.05013.75
5.2.170.0200.03311.21
5.2.160.0170.04011.34
5.2.150.0130.06011.31
5.2.140.0130.06011.13
5.2.130.0370.03311.38
5.2.120.0200.05011.09
5.2.110.0200.03711.34
5.2.100.0170.04711.15
5.2.90.0100.04311.13
5.2.80.0200.04311.11
5.2.70.0170.03711.11
5.2.60.0200.05011.33
5.2.50.0270.04711.25
5.2.40.0170.05011.20
5.2.30.0170.05310.99
5.2.20.0270.04010.96
5.2.10.0200.04710.91
5.2.00.0170.05710.89
5.1.60.0170.04710.09
5.1.50.0200.04010.10
5.1.40.0230.04010.09
5.1.30.0270.04010.51
5.1.20.0270.04010.41
5.1.10.0200.04310.13
5.1.00.0170.03310.15
5.0.50.0100.0308.81
5.0.40.0100.0238.59
5.0.30.0070.0438.43
5.0.20.0170.0208.31
5.0.10.0070.0308.29
5.0.00.0070.0478.48
4.4.90.0170.0176.97
4.4.80.0100.0176.97
4.4.70.0070.0236.97
4.4.60.0030.0276.97
4.4.50.0000.0276.97
4.4.40.0030.0476.97
4.4.30.0100.0306.97
4.4.20.0070.0306.97
4.4.10.0200.0276.97
4.4.00.0130.0676.97
4.3.110.0070.0276.97
4.3.100.0100.0206.97
4.3.90.0100.0206.97
4.3.80.0130.0406.97
4.3.70.0070.0276.97
4.3.60.0130.0276.97
4.3.50.0070.0306.97
4.3.40.0100.0406.97
4.3.30.0030.0276.97
4.3.20.0070.0236.97
4.3.10.0130.0236.97
4.3.00.0170.0177.63

preferences:
62.23 ms | 401 KiB | 5 Q