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->children())); } ?>

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.70.0110.01118.80
8.3.60.0100.01018.64
8.3.50.0100.01222.10
8.3.40.0140.00719.13
8.3.30.0140.00019.08
8.3.20.0080.00020.46
8.3.10.0050.00323.85
8.3.00.0040.00419.18
8.2.190.0100.00716.58
8.2.180.0200.00318.68
8.2.170.0090.00622.96
8.2.160.0070.01020.69
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0030.00619.79
8.2.110.0070.00419.48
8.2.100.0110.00017.91
8.2.90.0050.00220.86
8.2.80.0040.00420.78
8.2.70.0050.00318.29
8.2.60.0050.00518.47
8.2.50.0030.00718.10
8.2.40.0040.00419.59
8.2.30.0040.00419.52
8.2.20.0080.00017.96
8.2.10.0070.00018.23
8.2.00.0050.00317.90
8.1.280.0090.00625.92
8.1.270.0110.00719.25
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00022.88
8.1.230.0040.00821.09
8.1.220.0040.00417.91
8.1.210.0000.00819.20
8.1.200.0060.00317.48
8.1.190.0000.00817.35
8.1.180.0090.00518.10
8.1.170.0000.00818.88
8.1.160.0000.00719.11
8.1.150.0080.00019.16
8.1.140.0070.00017.55
8.1.130.0030.00318.03
8.1.120.0030.00317.63
8.1.110.0040.00417.75
8.1.100.0070.00017.66
8.1.90.0080.00017.56
8.1.80.0000.00817.68
8.1.70.0020.00517.71
8.1.60.0090.00017.74
8.1.50.0090.00017.73
8.1.40.0000.00817.59
8.1.30.0000.00817.94
8.1.20.0080.00017.75
8.1.10.0050.00217.65
8.1.00.0020.00517.71
8.0.300.0040.00420.11
8.0.290.0050.00317.00
8.0.280.0030.00318.64
8.0.270.0000.00717.36
8.0.260.0020.00517.40
8.0.250.0040.00417.30
8.0.240.0090.00017.21
8.0.230.0000.00717.30
8.0.220.0070.00017.23
8.0.210.0040.00417.27
8.0.200.0000.00617.15
8.0.190.0040.00417.14
8.0.180.0030.00717.05
8.0.170.0040.00417.23
8.0.160.0040.00417.07
8.0.150.0030.00517.20
8.0.140.0040.00417.05
8.0.130.0060.00013.51
8.0.120.0040.00417.11
8.0.110.0040.00417.06
8.0.100.0040.00417.05
8.0.90.0050.00217.05
8.0.80.0110.00417.07
8.0.70.0050.00217.11
8.0.60.0000.00717.21
8.0.50.0000.00817.09
8.0.30.0060.01617.36
8.0.20.0060.01217.48
8.0.10.0040.00417.10
8.0.00.0100.01017.01
7.4.330.0030.00315.03
7.4.320.0000.00716.88
7.4.300.0060.00016.82
7.4.290.0030.00316.63
7.4.280.0050.00316.67
7.4.270.0000.00816.73
7.4.260.0060.00316.78
7.4.250.0040.00416.85
7.4.240.0040.00316.78
7.4.230.0070.00016.81
7.4.220.0110.00816.86
7.4.210.0130.00316.71
7.4.200.0040.00416.85
7.4.160.0090.00616.97
7.4.150.0030.01417.40
7.4.140.0110.00817.86
7.4.130.0110.01216.73
7.4.120.0080.00916.83
7.4.110.0200.00316.99
7.4.100.0040.01316.98
7.4.90.0090.00916.69
7.4.80.0100.01419.39
7.4.70.0080.00816.89
7.4.60.0100.00716.88
7.4.50.0000.00516.75
7.4.40.0110.00716.76
7.4.30.0100.00716.77
7.4.00.0120.00615.05
7.3.330.0060.00013.54
7.3.320.0050.00013.45
7.3.310.0050.00316.67
7.3.300.0030.00316.70
7.3.290.0090.00516.59
7.3.280.0120.00916.54
7.3.270.0030.01817.40
7.3.260.0100.00716.77
7.3.250.0110.00716.65
7.3.240.0090.00916.57
7.3.230.0110.00816.87
7.3.210.0080.00816.63
7.3.200.0080.00819.39
7.3.190.0160.00616.48
7.3.180.0060.00916.48
7.3.170.0100.00716.68
7.3.160.0060.01016.81
7.2.330.0150.00316.62
7.2.320.0070.01017.01
7.2.310.0100.00716.83
7.2.300.0090.00916.88
7.2.290.0060.01216.67
7.2.60.0030.01317.04
7.2.00.0070.00719.64
7.1.200.0060.00915.93
7.1.100.0040.00718.20
7.1.70.0030.00517.40
7.1.60.0070.01819.22
7.1.50.0040.01817.14
7.1.00.0030.07722.41
7.0.200.0040.00416.93
7.0.140.0000.06022.04
7.0.60.0000.06019.91
7.0.50.0000.08717.96
7.0.40.0170.03320.12
7.0.30.0970.06020.27
7.0.20.0200.04320.26
7.0.10.0030.04320.23
7.0.00.0030.04020.14
5.6.280.0100.07020.95
5.6.210.0070.08320.86
5.6.200.0030.04318.30
5.6.190.0070.05020.78
5.6.180.0470.06720.48
5.6.170.0270.05320.55
5.6.160.0030.04320.67
5.6.150.0070.04718.29
5.6.140.0030.05718.30
5.6.130.0170.07018.31
5.6.120.0070.08321.21
5.6.110.0030.04321.18
5.6.100.0030.08021.06
5.6.90.0030.08321.07
5.6.80.0030.04020.43
5.5.350.0300.07320.43
5.5.340.0130.07318.07
5.5.330.0030.04020.26
5.5.320.0170.06020.31
5.5.310.0300.08020.26
5.5.300.0070.07318.14
5.5.290.0070.08018.05
5.5.280.0100.03720.72
5.5.270.0000.04720.84
5.5.260.0070.06320.83
5.5.250.0100.05320.83
5.5.240.0030.04320.16
5.4.450.0300.03719.66
5.4.440.0370.04719.48
5.4.430.0500.05719.48
5.4.420.0200.05719.47
5.4.410.0330.04719.48
5.4.400.0230.03719.16
5.4.390.0300.04319.28
5.4.380.0300.03319.30
5.4.370.0230.03719.23
5.4.360.0200.04319.13
5.4.350.0230.04319.32
5.4.340.0270.04018.98
5.4.320.0200.04319.16
5.4.310.0200.04019.00
5.4.300.0330.03019.15
5.4.290.0270.03719.00
5.4.280.0270.04019.30
5.4.270.0200.04319.32
5.4.260.0270.03319.31
5.4.250.0230.04019.23
5.4.240.0230.03719.22
5.4.230.0330.04319.15
5.4.220.0270.04019.15
5.4.210.0370.02718.95
5.4.200.0230.04018.97
5.4.190.0230.03719.06
5.4.180.0400.03718.96
5.4.170.0200.04019.27
5.4.160.0300.03319.24
5.4.150.0300.03718.94
5.4.140.0230.03716.46
5.4.130.0230.03716.47
5.4.120.0200.04016.45
5.4.110.0230.03716.60
5.4.100.0300.03016.57
5.4.90.0200.03716.55
5.4.80.0300.03016.56
5.4.70.0330.02316.54
5.4.60.0230.03716.53
5.4.50.0270.03316.61
5.4.40.0270.04016.55
5.4.30.0300.04316.39
5.4.20.0300.03716.57
5.4.10.0330.02716.39
5.4.00.0270.03316.22
5.3.290.0230.03716.22
5.3.280.0300.03716.22
5.3.270.0300.05016.22
5.3.260.0270.03716.22
5.3.250.0300.03316.22
5.3.240.0230.03716.22
5.3.230.0270.03716.22
5.3.220.0300.03316.22
5.3.210.0300.05316.22
5.3.200.0370.03316.22
5.3.190.0370.03716.22
5.3.180.0330.03016.22
5.3.170.0230.03716.22
5.3.160.0270.03316.22
5.3.150.0330.03016.22
5.3.140.0330.02716.22
5.3.130.0300.04016.22
5.3.120.0400.03716.22
5.3.110.0330.04716.22
5.3.100.0330.05316.22
5.3.90.0370.03716.22
5.3.80.0200.04016.22
5.3.70.0370.06716.22
5.3.60.0300.03716.22
5.3.50.0200.04016.22
5.3.40.0300.06716.22
5.3.30.0300.04016.22
5.3.20.0300.07016.22
5.3.10.0270.03316.22
5.3.00.0370.06316.22
5.2.170.0200.03716.22
5.2.160.0230.05316.22
5.2.150.0300.05716.22
5.2.140.0230.05016.22
5.2.130.0170.03316.22
5.2.120.0330.02716.22
5.2.110.0300.05016.22
5.2.100.0230.04016.22
5.2.90.0230.04316.22
5.2.80.0330.04316.22
5.2.70.0230.03716.22
5.2.60.0230.05716.22
5.2.50.0330.05016.22
5.2.40.0170.03016.22
5.2.30.0270.05316.22
5.2.20.0230.05316.22
5.2.10.0170.04016.22
5.2.00.0330.04716.22
5.1.60.0200.04316.22
5.1.50.0230.05016.22
5.1.40.0230.04716.22
5.1.30.0200.03016.22
5.1.20.0170.05716.22
5.1.10.0200.03316.22
5.1.00.0270.05016.22
5.0.50.0130.02016.22
5.0.40.0100.04716.22
5.0.30.0130.04316.22
5.0.20.0070.02316.22
5.0.10.0130.03316.22
5.0.00.0130.02716.22
4.4.90.0100.01716.22
4.4.80.0070.02016.22
4.4.70.0070.03016.22
4.4.60.0070.02016.22
4.4.50.0100.02016.22
4.4.40.0130.02716.22
4.4.30.0070.01716.22
4.4.20.0200.02716.22
4.4.10.0100.01716.22
4.4.00.0130.05016.22
4.3.110.0100.01716.22
4.3.100.0130.03316.22
4.3.90.0130.03316.22
4.3.80.0070.02716.22
4.3.70.0130.03316.22
4.3.60.0100.02016.22
4.3.50.0070.01716.22
4.3.40.0100.03016.22
4.3.30.0070.03716.22
4.3.20.0070.02016.22
4.3.10.0030.02016.22
4.3.00.0070.02316.22

preferences:
62.32 ms | 401 KiB | 5 Q