3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyXML extends SimpleXMLElement { public function firstChild() { $children = $this->getChildren(); foreach ($children as $key => $value) break; return $value; } } $s = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'. '<request>'. ' <body>'. ' <rows>'. ' <row id="1"/>'. ' <row id="2"/>'. ' <row id="3"/>'. ' <row2 ver="2.0">test data</row2>'. ' </rows>'. ' </body>'. '</request>'; $obj = new MyXML($s); var_dump($obj->firstChild());

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.00017.00
8.3.50.0090.00617.62
8.3.40.0120.00318.92
8.3.30.0120.00618.78
8.3.20.0080.00019.02
8.3.10.0110.00320.78
8.3.00.0080.00019.32
8.2.180.0140.00717.13
8.2.170.0130.00322.96
8.2.160.0150.00320.60
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00719.40
8.2.110.0050.00520.68
8.2.100.0070.00419.76
8.2.90.0080.00018.00
8.2.80.0000.00819.05
8.2.70.0040.00417.93
8.2.60.0000.00818.27
8.2.50.0060.00318.10
8.2.40.0000.00819.73
8.2.30.0060.00318.27
8.2.20.0040.00417.93
8.2.10.0040.00417.92
8.2.00.0040.00417.89
8.1.280.0100.00725.92
8.1.270.0090.00024.66
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00624.16
8.1.230.0070.00419.82
8.1.220.0050.00318.00
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0040.00417.48
8.1.180.0080.00019.22
8.1.170.0030.00618.76
8.1.160.0070.00019.06
8.1.150.0040.00418.86
8.1.140.0040.00417.61
8.1.130.0070.00018.02
8.1.120.0000.00717.60
8.1.110.0080.00017.57
8.1.100.0080.00017.59
8.1.90.0070.00417.63
8.1.80.0030.00317.57
8.1.70.0040.00417.71
8.1.60.0000.00817.68
8.1.50.0020.00517.63
8.1.40.0030.00517.66
8.1.30.0080.00017.88
8.1.20.0040.00417.97
8.1.10.0040.00417.66
8.1.00.0060.00317.54
8.0.300.0070.00018.77
8.0.290.0040.00417.00
8.0.280.0040.00418.56
8.0.270.0050.00317.48
8.0.260.0030.00317.10
8.0.250.0040.00417.33
8.0.240.0000.00717.20
8.0.230.0000.00717.13
8.0.220.0000.00817.18
8.0.210.0000.00817.04
8.0.200.0030.00317.28
8.0.190.0070.00017.26
8.0.180.0070.00017.27
8.0.170.0000.00917.05
8.0.160.0070.00017.31
8.0.150.0080.00017.11
8.0.140.0030.00517.17
8.0.130.0000.00513.62
8.0.120.0060.00317.14
8.0.110.0040.00417.05
8.0.100.0080.00017.21
8.0.90.0070.00017.20
8.0.80.0120.00417.06
8.0.70.0040.00417.00
8.0.60.0030.00517.19
8.0.50.0070.00017.24
8.0.30.0080.01017.42
8.0.20.0130.01017.21
8.0.10.0020.00517.36
8.0.00.0120.00516.99
7.4.330.0000.00513.23
7.4.320.0030.00316.68
7.4.300.0000.00616.74
7.4.290.0030.00316.65
7.4.280.0050.00316.65
7.4.270.0030.00416.84
7.4.260.0050.00313.57
7.4.250.0000.00816.73
7.4.240.0000.00716.80
7.4.230.0030.00316.59
7.4.220.0150.00616.77
7.4.210.0050.01016.82
7.4.200.0070.00016.82
7.4.190.0050.00216.70
7.4.160.0120.00416.73
7.4.150.0060.01216.75
7.4.140.0100.01216.75
7.4.130.0060.01116.78
7.4.120.0130.00516.72
7.4.110.0100.00716.86
7.4.100.0090.00816.82
7.4.90.0120.00616.47
7.4.80.0120.00619.39
7.4.70.0120.00416.89
7.4.60.0210.00416.61
7.4.50.0030.00616.59
7.4.40.0040.00816.81
7.4.30.0120.00616.75
7.4.00.0030.01414.86
7.3.330.0030.00313.59
7.3.320.0030.00213.38
7.3.310.0000.00816.38
7.3.300.0040.00416.55
7.3.290.0060.00916.61
7.3.280.0100.00516.56
7.3.270.0000.01716.89
7.3.260.0070.01016.58
7.3.250.0090.01316.59
7.3.240.0100.00716.58
7.3.230.0040.01516.63
7.3.210.0080.00816.67
7.3.200.0100.00716.66
7.3.190.0090.00816.48
7.3.180.0090.00616.75
7.3.170.0120.00616.71
7.3.160.0030.01416.73
7.3.120.0030.01014.82
7.3.10.0040.00716.71
7.3.00.0060.00616.55
7.2.330.0140.00316.86
7.2.320.0040.01516.87
7.2.310.0100.01416.63
7.2.300.0100.00716.89
7.2.290.0100.00716.66
7.2.130.0070.00316.85
7.2.120.0090.00316.55
7.2.110.0030.01016.73
7.2.100.0090.00617.20
7.2.90.0000.01116.95
7.2.80.0000.01216.58
7.2.70.0000.01216.45
7.2.60.0030.01016.94
7.2.50.0030.00716.76
7.2.40.0110.00417.02
7.2.30.0050.00517.09
7.2.20.0080.00616.86
7.2.10.0050.00516.86
7.2.00.0060.00617.13
7.1.250.0060.00615.69
7.1.200.0130.00015.98
7.1.70.0030.00717.23
7.1.60.0040.01919.40
7.1.50.0090.01617.11
7.1.00.0070.07322.55
7.0.200.0440.01114.91
7.0.140.0030.07022.14
7.0.120.0070.07022.10
7.0.60.0030.07320.13
7.0.50.0000.07018.06
7.0.40.0030.04720.22
7.0.30.0300.07320.32
7.0.20.0370.06720.19
7.0.10.0030.09020.26
7.0.00.0100.04320.20
5.6.280.0000.07721.06
5.6.210.0070.08720.87
5.6.200.0030.04318.28
5.6.190.0030.08320.81
5.6.180.3700.04020.55
5.6.170.0200.04020.62
5.6.160.0030.05320.68
5.6.150.0100.06318.22
5.6.140.0000.07318.38
5.6.130.0100.05318.26
5.6.120.0030.04021.17
5.6.110.0230.07321.20
5.6.100.0100.08020.98
5.6.90.0130.07721.07
5.6.80.0130.05320.55
5.6.70.3300.03320.62
5.5.350.0030.04020.59
5.5.340.0170.06718.13
5.5.330.0030.04720.33
5.5.320.0300.04720.37
5.5.310.0330.06320.60
5.5.300.0130.07018.05
5.5.290.0100.06018.02
5.5.280.0200.03321.10
5.5.270.0100.08021.00
5.5.260.0070.03720.76
5.5.250.0070.06020.73
5.5.240.0130.07020.23
5.4.450.0170.07319.57
5.4.440.0030.06019.38
5.4.430.0000.04719.24
5.4.420.0000.07319.77
5.4.410.0000.08319.39
5.4.400.0030.07719.23
5.4.390.0070.06719.05
5.4.380.0070.05019.39
5.4.370.0000.04319.16
5.4.360.0030.08018.93
5.4.350.0070.07019.29
5.4.340.0070.04719.06
5.4.320.0100.06719.06
5.4.310.0030.05719.08
5.4.300.0030.04718.92
5.4.290.0070.03719.29
5.4.280.0030.03718.93
5.4.270.0030.04018.94
5.4.260.0100.03719.05
5.4.250.0030.03719.34
5.4.240.0070.04319.27
5.4.230.0030.03719.21
5.4.220.0230.03718.93
5.4.210.0030.03719.14
5.4.200.0030.03719.14
5.4.190.0030.03719.43
5.4.180.0070.03319.07
5.4.170.0000.04019.18
5.4.160.0030.03719.06
5.4.150.0100.03019.20
5.4.140.0000.04016.48
5.4.130.0070.03016.38
5.4.120.0030.03316.51
5.4.110.0070.03316.59
5.4.100.0000.03716.72
5.4.90.0000.03716.55
5.4.80.0030.03316.54
5.4.70.0030.04016.46
5.4.60.0000.04016.43
5.4.50.0130.02316.56
5.4.40.0030.03316.48
5.4.30.0000.03716.55
5.4.20.0130.03016.53
5.4.10.0000.04016.69
5.4.00.0030.03715.93
5.3.290.0130.06314.84
5.3.280.0000.04014.73
5.3.270.0000.04014.74
5.3.260.0000.04714.73
5.3.250.0030.03714.85
5.3.240.0000.04714.71
5.3.230.0100.04014.82
5.3.220.0100.03014.70
5.3.210.0030.03714.66
5.3.200.0000.04014.70
5.3.190.0000.04014.71
5.3.180.0030.04014.71
5.3.170.0070.05714.70
5.3.160.0070.03014.65
5.3.150.0030.03314.67
5.3.140.0000.03714.69
5.3.130.0030.03714.69
5.3.120.0000.04014.73
5.3.110.0030.03714.64
5.3.100.0000.06014.14
5.3.90.0000.04014.15
5.3.80.0100.03014.25
5.3.70.0000.04014.11
5.3.60.0030.06314.20
5.3.50.0070.03714.17
5.3.40.0130.03314.09
5.3.30.0100.04713.93
5.3.20.0000.04313.91
5.3.10.0200.06013.68
5.3.00.0000.07713.68
5.2.170.0000.03311.27
5.2.160.0030.03311.19
5.2.150.0030.04011.27
5.2.140.0000.04711.33
5.2.130.0070.02311.31
5.2.120.0100.04011.34
5.2.110.0070.02711.17
5.2.100.0000.04011.19
5.2.90.0030.03311.29
5.2.80.0070.04011.32
5.2.70.0000.05011.22
5.2.60.0130.05311.29
5.2.50.0030.03311.21
5.2.40.0070.06711.02
5.2.30.0130.05311.01
5.2.20.0130.02311.15
5.2.10.0030.06311.05
5.2.00.0070.04010.81
5.1.60.0130.04710.04
5.1.50.0030.0509.98
5.1.40.0030.04310.13
5.1.30.0070.04710.52
5.1.20.0000.04710.48
5.1.10.0070.03310.16
5.1.00.0070.03010.21
5.0.50.0000.0508.65
5.0.40.0070.0308.59
5.0.30.0030.0578.49
5.0.20.0070.0478.49
5.0.10.0070.0378.49
5.0.00.0000.0378.49
4.4.90.0000.0338.49
4.4.80.0000.0238.49
4.4.70.0000.0278.49
4.4.60.0030.0138.49
4.4.50.0030.0178.49
4.4.40.0030.0438.49
4.4.30.0000.0378.49
4.4.20.0030.0278.49
4.4.10.0000.0278.49
4.4.00.0070.0438.49
4.3.110.0000.0278.49
4.3.100.0000.0278.49
4.3.90.0070.0238.49
4.3.80.0000.0278.49
4.3.70.0000.0308.49
4.3.60.0000.0178.49
4.3.50.0030.0208.49
4.3.40.0030.0438.49
4.3.30.0000.0238.49
4.3.20.0000.0338.49
4.3.10.0030.0208.49
4.3.00.0070.0108.49

preferences:
38.82 ms | 401 KiB | 5 Q