3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyXML extends SimpleXMLElement { public function firstChild() { $children = $this->children(); foreach ($children as $key => $value) break; /*var_dump( $this->getName(), $key );*/ return $value; } public function t() { } } $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); $row = $obj->firstChild()->firstChild()->firstChild(); foreach ($row as $i => $r) var_dump(array($i, $r));

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.0120.00818.68
8.3.50.0160.00522.15
8.3.40.0060.00918.92
8.3.30.0100.00719.36
8.3.20.0030.00520.50
8.3.10.0040.00422.30
8.3.00.0030.00722.56
8.2.180.0070.01116.88
8.2.170.0110.00722.96
8.2.160.0110.00721.19
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0000.00819.61
8.2.110.0090.00020.68
8.2.100.0070.00717.97
8.2.90.0040.00417.88
8.2.80.0000.00819.05
8.2.70.0000.00818.05
8.2.60.0040.00417.63
8.2.50.0060.00317.63
8.2.40.0030.00521.18
8.2.30.0050.00318.26
8.2.20.0000.00717.87
8.2.10.0000.00818.02
8.2.00.0040.00417.92
8.1.280.0080.01525.92
8.1.270.0080.00024.09
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00024.14
8.1.230.0090.00622.88
8.1.220.0040.00417.91
8.1.210.0030.00518.77
8.1.200.0080.00017.47
8.1.190.0040.00717.21
8.1.180.0030.00618.10
8.1.170.0040.00419.34
8.1.160.0070.00322.23
8.1.150.0050.00218.75
8.1.140.0030.00517.56
8.1.130.0000.00718.04
8.1.120.0070.00017.58
8.1.110.0000.00717.55
8.1.100.0040.00417.57
8.1.90.0070.00017.70
8.1.80.0040.00417.57
8.1.70.0000.00817.54
8.1.60.0030.00517.80
8.1.50.0080.00017.62
8.1.40.0080.00017.80
8.1.30.0000.00917.83
8.1.20.0040.00417.94
8.1.10.0000.00717.66
8.1.00.0080.00017.79
8.0.300.0000.00818.77
8.0.290.0000.00817.00
8.0.280.0070.00018.66
8.0.270.0030.00517.51
8.0.260.0030.00317.13
8.0.250.0030.00517.18
8.0.240.0000.00717.19
8.0.230.0000.00717.26
8.0.220.0000.00716.99
8.0.210.0000.00716.93
8.0.200.0030.00317.09
8.0.190.0000.00717.16
8.0.180.0040.00417.21
8.0.170.0040.00417.19
8.0.160.0040.00416.98
8.0.150.0040.00417.06
8.0.140.0080.00017.07
8.0.130.0050.00013.51
8.0.120.0000.00817.01
8.0.110.0040.00417.05
8.0.100.0070.00017.17
8.0.90.0050.00217.07
8.0.80.0070.01517.13
8.0.70.0000.00717.10
8.0.60.0040.00417.02
8.0.50.0000.00717.16
8.0.30.0120.00717.24
8.0.20.0080.01017.40
8.0.10.0040.00417.32
8.0.00.0150.00616.75
7.4.330.0000.00615.18
7.4.320.0020.00516.74
7.4.300.0060.00016.66
7.4.290.0000.00716.73
7.4.280.0000.00716.72
7.4.270.0030.00316.73
7.4.260.0030.00316.70
7.4.250.0000.00716.66
7.4.240.0060.00216.78
7.4.230.0000.00816.52
7.4.220.0060.01316.73
7.4.210.0090.00716.79
7.4.200.0030.00516.74
7.4.190.0080.00016.79
7.4.160.0130.00616.77
7.4.150.0070.01017.40
7.4.140.0110.01217.86
7.4.130.0050.01216.74
7.4.120.0110.00616.67
7.4.110.0040.01316.85
7.4.100.0110.00716.63
7.4.90.0000.02316.77
7.4.80.0050.01416.70
7.4.70.0170.00616.77
7.4.60.0030.01316.63
7.4.50.0030.00316.75
7.4.40.0050.00822.77
7.4.30.0070.01016.77
7.4.00.0020.01515.00
7.3.330.0050.00013.59
7.3.320.0060.00013.52
7.3.310.0030.00316.59
7.3.300.0000.00716.55
7.3.290.0060.00916.51
7.3.280.0080.01016.50
7.3.270.0120.00617.40
7.3.260.0120.00516.62
7.3.250.0070.01216.56
7.3.240.0030.01316.85
7.3.230.0040.01216.57
7.3.210.0150.00616.80
7.3.200.0120.01019.39
7.3.190.0160.00316.71
7.3.180.0100.01216.61
7.3.170.0090.00816.70
7.3.160.0130.00316.63
7.3.120.0060.00915.12
7.3.110.0110.00715.01
7.3.100.0030.01315.12
7.3.90.0000.00914.86
7.3.80.0060.00915.11
7.3.70.0000.01014.97
7.3.60.0100.00315.00
7.3.50.0030.00714.98
7.3.40.0060.01214.76
7.3.30.0070.00714.71
7.3.20.0060.00916.79
7.3.10.0070.00716.84
7.3.00.0070.00716.54
7.2.330.0030.01316.93
7.2.320.0070.01416.92
7.2.310.0070.01017.04
7.2.300.0090.01216.68
7.2.290.0150.00616.76
7.2.250.0070.01115.15
7.2.240.0130.00615.10
7.2.230.0060.00615.15
7.2.220.0030.00615.06
7.2.210.0030.01415.26
7.2.200.0040.01414.91
7.2.190.0070.00715.25
7.2.180.0070.00715.25
7.2.170.0000.01815.16
7.2.80.0000.01616.77
7.2.60.0030.01316.93
7.2.00.0060.00619.62
7.1.330.0030.01015.83
7.1.320.0000.01315.70
7.1.310.0040.01215.72
7.1.300.0030.01015.88
7.1.290.0090.00615.90
7.1.280.0070.00715.79
7.1.270.0070.00716.07
7.1.260.0060.00615.74
7.1.200.0060.00615.70
7.1.100.0060.00918.36
7.1.70.0000.01117.31
7.1.60.0100.00719.82
7.1.50.0070.01416.94
7.1.00.0000.08022.59
7.0.200.0070.00316.75
7.0.140.0070.07022.09
7.0.70.0100.06021.75
7.0.60.0070.08321.82
7.0.50.0070.07722.14
7.0.40.0070.08320.18
7.0.30.0100.07320.11
7.0.20.0100.08020.08
7.0.10.0030.08320.22
7.0.00.0030.08720.22
5.6.280.0030.07321.16
5.6.220.0030.07720.73
5.6.210.0100.07720.61
5.6.200.0070.07721.09
5.6.190.0100.07720.93
5.6.180.0070.08321.17
5.6.170.0030.08021.11
5.6.160.0130.07721.13
5.6.150.0100.07320.98
5.6.140.0030.08321.16
5.6.130.0000.08721.27
5.6.120.0200.07321.05
5.6.110.0100.07721.09
5.6.100.0100.07321.14
5.6.90.0070.08021.20
5.6.80.0100.07320.47
5.6.70.0030.06720.45
5.6.60.0030.08320.62
5.6.50.0100.06320.65
5.6.40.0000.04020.47
5.6.30.0100.07720.45
5.6.20.0070.07020.48
5.6.10.0030.08020.50
5.6.00.0100.07320.43
5.5.360.0070.07720.39
5.5.350.0030.09020.39
5.5.340.0070.07020.85
5.5.330.0100.07321.03
5.5.320.0070.07320.94
5.5.310.0070.07720.80
5.5.300.0000.06720.84
5.5.290.0130.07020.87
5.5.280.0000.08720.80
5.5.270.0130.07320.99
5.5.260.0030.07320.93
5.5.250.0070.06020.80
5.5.240.0030.08020.31
5.5.230.0070.07020.31
5.5.220.0100.06020.15
5.5.210.0070.05020.32
5.5.200.0030.08320.13
5.5.190.0000.07720.25
5.5.180.0070.06320.36
5.5.160.0070.08020.33
5.5.150.0070.07720.39
5.5.140.0030.04720.39
5.5.130.0100.06720.31
5.5.120.0000.08320.25
5.5.110.0000.08320.34
5.5.100.0100.06720.14
5.5.90.0070.07020.13
5.5.80.0070.06320.11
5.5.70.0100.07720.11
5.5.60.0030.05320.00
5.5.50.0100.04020.07
5.5.40.0170.06320.11
5.5.30.0100.07020.04
5.5.20.0030.07320.24
5.5.10.0030.08320.19
5.5.00.0030.05020.09
5.4.450.0030.08319.58
5.4.440.0030.08319.35
5.4.430.0030.08019.54
5.4.420.0000.06319.55
5.4.410.0000.05019.46
5.4.400.0000.06719.18
5.4.390.0030.07019.34
5.4.380.0000.04319.25
5.4.370.0130.07019.21
5.4.360.0030.05019.21
5.4.350.0130.06319.16
5.4.340.0000.05719.24
5.4.320.0000.08319.02
5.4.310.0030.06319.27
5.4.300.0100.05319.21
5.4.290.0000.07019.36
5.4.280.0030.05718.93
5.4.270.0100.06019.23
5.4.260.0070.07319.24
5.4.250.0030.05319.28
5.4.240.0000.08319.24
5.4.230.0100.06719.34
5.4.220.0030.07319.22
5.4.210.0000.07719.25
5.4.200.0070.04319.08
5.4.190.0000.07719.23
5.4.180.0030.04318.92
5.4.170.0030.07719.24
5.4.160.0070.07319.20
5.4.150.0070.07719.21
5.4.140.0070.06716.48
5.4.130.0030.07716.30
5.4.120.0030.07016.52
5.4.110.0100.07316.57
5.4.100.0030.04016.45
5.4.90.0000.06316.56
5.4.80.0070.06716.53
5.4.70.0000.07016.51
5.4.60.0070.06716.54
5.4.50.0070.05716.61
5.4.40.0030.06316.52
5.4.30.0030.06016.58
5.4.20.0000.07716.43
5.4.10.0000.07016.60
5.4.00.0100.06315.97
5.3.290.0130.06314.81
5.3.280.0000.08314.82
5.3.270.0030.05714.82
5.3.260.0000.06014.82
5.3.250.0030.05714.85
5.3.240.0030.06314.74
5.3.230.0030.07714.82
5.3.220.0070.06014.71
5.3.210.0070.05314.78
5.3.200.0030.05714.81
5.3.190.0100.06714.57
5.3.180.0070.07014.77
5.3.170.0030.07314.78
5.3.160.0030.06314.63
5.3.150.0030.07714.73
5.3.140.0030.07014.63
5.3.130.0130.07014.66
5.3.120.0070.06314.68
5.3.110.0000.07014.71
5.3.100.0030.06314.06
5.3.90.0030.07014.26
5.3.80.0070.06014.26
5.3.70.0030.07314.13
5.3.60.0070.05314.17
5.3.50.0030.07313.96
5.3.40.0030.06714.09
5.3.30.0000.04314.04
5.3.20.0070.07013.95
5.3.10.0100.06313.87
5.3.00.0030.05013.84
5.2.170.0070.07312.52
5.2.160.0000.04712.52
5.2.150.0000.04012.52
5.2.140.0070.05712.52
5.2.130.0000.06312.52
5.2.120.0030.06012.52
5.2.110.0000.04712.52
5.2.100.0070.06012.52
5.2.90.0030.06012.52
5.2.80.0030.04712.52
5.2.70.0030.06012.52
5.2.60.0000.05312.52
5.2.50.0030.06012.52
5.2.40.0030.06012.52
5.2.30.0030.06012.52
5.2.20.0070.05712.52
5.2.10.0000.06312.52
5.2.00.0030.05012.52
5.1.60.0070.04312.52
5.1.50.0030.05012.52
5.1.40.0070.04712.52
5.1.30.0070.05312.52
5.1.20.0000.05312.52
5.1.10.0100.04012.52
5.1.00.0000.05712.52
5.0.50.0030.04312.52
5.0.40.0000.04712.52
5.0.30.0000.06712.52
5.0.20.0000.04312.52
5.0.10.0000.04712.52
5.0.00.0000.06312.52
4.4.90.0030.03712.52
4.4.80.0000.03312.52
4.4.70.0030.03712.52
4.4.60.0000.03312.52
4.4.50.0000.03712.52
4.4.40.0000.05012.52
4.4.30.0070.02712.52
4.4.20.0030.03012.52
4.4.10.0000.03012.52
4.4.00.0000.04712.52
4.3.110.0000.02712.52
4.3.100.0000.03012.52
4.3.90.0000.03312.52
4.3.80.0070.04712.52
4.3.70.0000.03312.52
4.3.60.0000.03312.52
4.3.50.0000.03012.52
4.3.40.0030.04712.52
4.3.30.0030.03012.52
4.3.20.0000.04012.52
4.3.10.0000.03012.52
4.3.00.0000.03712.52

preferences:
47.6 ms | 400 KiB | 5 Q