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; } } $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()->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.0120.00918.55
8.3.50.0130.00622.17
8.3.40.0070.01418.66
8.3.30.0180.00319.28
8.3.20.0000.00820.51
8.3.10.0040.00423.78
8.3.00.0090.00922.70
8.2.180.0090.00616.75
8.2.170.0120.00322.96
8.2.160.0140.00022.37
8.2.150.0070.01424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00417.75
8.2.110.0090.00022.38
8.2.100.0090.00317.97
8.2.90.0060.00320.86
8.2.80.0070.00019.57
8.2.70.0040.00419.89
8.2.60.0050.00318.05
8.2.50.0030.00518.10
8.2.40.0040.00420.72
8.2.30.0040.00418.23
8.2.20.0050.00217.85
8.2.10.0030.00617.94
8.2.00.0080.00017.88
8.1.280.0000.01525.92
8.1.270.0040.00424.12
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00322.74
8.1.230.0080.00421.15
8.1.220.0090.00018.02
8.1.210.0030.00618.95
8.1.200.0000.01017.36
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0000.00818.77
8.1.160.0050.00322.27
8.1.150.0000.00818.83
8.1.140.0030.00617.71
8.1.130.0030.00517.99
8.1.120.0000.00717.59
8.1.110.0000.00817.60
8.1.100.0040.00417.65
8.1.90.0030.00517.61
8.1.80.0040.00417.69
8.1.70.0030.00317.59
8.1.60.0040.00417.71
8.1.50.0050.00317.75
8.1.40.0000.00817.71
8.1.30.0080.00017.83
8.1.20.0050.00317.94
8.1.10.0070.00017.81
8.1.00.0040.00417.67
8.0.300.0000.00720.32
8.0.290.0040.00416.88
8.0.280.0050.00318.55
8.0.270.0040.00417.42
8.0.260.0040.00417.04
8.0.250.0030.00317.24
8.0.240.0030.00617.12
8.0.230.0100.00017.14
8.0.220.0040.00416.98
8.0.210.0000.00717.19
8.0.200.0030.00317.18
8.0.190.0070.00317.22
8.0.180.0040.00417.04
8.0.170.0080.00017.14
8.0.160.0000.00817.16
8.0.150.0000.00717.05
8.0.140.0040.00416.98
8.0.130.0030.00313.49
8.0.120.0000.00817.11
8.0.110.0000.00817.16
8.0.100.0050.00316.93
8.0.90.0040.00417.00
8.0.80.0070.01517.16
8.0.70.0070.00017.14
8.0.60.0040.00416.85
8.0.50.0040.00417.09
8.0.30.0150.00517.20
8.0.20.0100.01017.45
8.0.10.0030.00617.34
8.0.00.0140.00817.13
7.4.330.0000.00515.18
7.4.320.0030.00316.76
7.4.300.0000.00616.72
7.4.290.0070.00016.75
7.4.280.0070.00016.71
7.4.270.0000.00816.72
7.4.260.0000.00816.69
7.4.250.0030.00716.53
7.4.240.0040.00316.80
7.4.230.0070.00016.73
7.4.220.0130.00616.60
7.4.210.0070.01116.79
7.4.200.0030.00316.82
7.4.190.0040.00416.89
7.4.160.0120.00416.53
7.4.150.0040.01517.40
7.4.140.0090.01017.86
7.4.130.0050.01516.74
7.4.120.0120.00616.61
7.4.110.0120.00616.73
7.4.100.0210.00016.70
7.4.90.0100.00716.60
7.4.80.0160.00716.66
7.4.70.0040.01316.83
7.4.60.0130.00316.72
7.4.50.0000.00816.53
7.4.40.0040.00822.77
7.4.30.0110.00616.71
7.4.00.0000.01415.18
7.3.330.0030.00313.54
7.3.320.0050.00013.54
7.3.310.0070.00016.62
7.3.300.0030.00316.53
7.3.290.0040.01116.46
7.3.280.0130.00516.50
7.3.270.0090.00917.40
7.3.260.0130.01316.76
7.3.250.0060.01116.59
7.3.240.0090.00916.47
7.3.230.0080.00816.62
7.3.210.0090.00916.66
7.3.200.0100.00719.39
7.3.190.0030.01316.74
7.3.180.0080.00816.71
7.3.170.0040.01216.52
7.3.160.0100.00716.75
7.3.120.0080.00615.06
7.2.330.0070.01516.70
7.2.320.0100.01316.89
7.2.310.0080.01016.91
7.2.300.0140.00316.84
7.2.290.0120.00616.77
7.2.60.0080.00316.95
7.2.00.0060.01019.53
7.1.200.0090.00615.99
7.1.100.0000.01118.38
7.1.70.0000.00817.30
7.1.60.0070.01519.24
7.1.50.0130.01034.62
7.1.00.0030.07722.64
7.0.200.0070.00316.69
7.0.140.0030.07322.13
7.0.100.0000.09320.07
7.0.90.0100.04019.94
7.0.80.0300.08719.98
7.0.70.0200.07320.01
7.0.60.0200.07720.01
7.0.50.0270.05020.40
7.0.40.0130.07720.06
7.0.30.0030.08720.18
7.0.20.0030.04320.23
7.0.10.0030.05020.16
7.0.00.0070.05020.17
5.6.280.0130.06321.17
5.6.250.0000.09020.70
5.6.240.0070.07720.67
5.6.230.0070.08020.52
5.6.220.0030.04720.66
5.6.210.0200.04020.66
5.6.200.0070.05021.07
5.6.190.0130.08021.01
5.6.180.0030.06321.14
5.6.170.0070.07721.10
5.6.160.0100.07721.26
5.6.150.0100.05321.10
5.6.140.0070.08021.10
5.6.130.0070.05021.00
5.6.120.0000.05321.07
5.6.110.0130.07721.15
5.6.100.0070.05721.27
5.6.90.0070.06321.26
5.6.80.0100.04720.57
5.6.70.0100.04320.64
5.6.60.0070.05720.52
5.6.50.0030.08020.54
5.6.40.0130.05320.43
5.6.30.0100.06720.50
5.6.20.0230.04720.48
5.6.10.0070.06720.42
5.6.00.0070.04320.53
5.5.380.0100.06720.46
5.5.370.0130.06720.44
5.5.360.0170.07020.41
5.5.350.0130.07320.46
5.5.340.0100.04320.85
5.5.330.0100.07020.86
5.5.320.0100.07320.81
5.5.310.0130.07021.03
5.5.300.0100.05320.95
5.5.290.0070.08321.04
5.5.280.0100.07320.81
5.5.270.0130.06320.95
5.5.260.0100.04720.82
5.5.250.0030.05320.85
5.5.240.0030.04720.30
5.5.230.0070.08020.41
5.5.220.0030.04320.38
5.5.210.0100.03720.32
5.5.200.0000.04720.20
5.5.190.0200.06720.38
5.5.180.0100.07720.29
5.5.160.0030.06320.33
5.5.150.0030.04320.36
5.5.140.0170.07020.32
5.5.130.0070.04320.34
5.5.120.0100.06720.39
5.5.110.0100.04720.28
5.5.100.0070.07320.27
5.5.90.0130.03020.05
5.5.80.0070.06320.24
5.5.70.0030.06320.11
5.5.60.0030.04320.14
5.5.50.0100.04320.13
5.5.40.0070.07020.23
5.5.30.0070.07320.25
5.5.20.0070.06720.27
5.5.10.0000.07020.23
5.5.00.0070.07020.05
5.4.450.0070.09319.61
5.4.440.0130.08019.61
5.4.430.0170.05719.27
5.4.420.0170.04719.34
5.4.410.0030.04319.39
5.4.400.0100.06019.04
5.4.390.0070.07719.25
5.4.380.0130.04019.30
5.4.370.0000.08019.10
5.4.360.0070.06319.24
5.4.350.0030.07719.27
5.4.340.0070.06719.02
5.4.320.0070.03719.36
5.4.310.0070.06719.23
5.4.300.0030.06319.05
5.4.290.0070.07319.38
5.4.280.0100.07719.10
5.4.270.0100.05319.13
5.4.260.0100.05319.27
5.4.250.0130.03719.01
5.4.240.0030.04719.10
5.4.230.0070.04719.29
5.4.220.0170.02719.37
5.4.210.0070.07019.27
5.4.200.0030.04319.24
5.4.190.0030.07019.23
5.4.180.0100.07319.18
5.4.170.0070.06019.24
5.4.160.0000.04019.01
5.4.150.0230.02319.36
5.4.140.0130.06016.62
5.4.130.0100.06716.53
5.4.120.0130.04716.61
5.4.110.0100.07316.49
5.4.100.0030.06716.46
5.4.90.0000.04016.68
5.4.80.0030.06316.56
5.4.70.0000.04016.61
5.4.60.0030.07016.61
5.4.50.0070.06716.60
5.4.40.0000.05016.59
5.4.30.0170.07016.52
5.4.20.0070.03316.46
5.4.10.0070.04016.52
5.4.00.0100.04316.07
5.3.290.0030.04014.71
5.3.280.0030.04014.73
5.3.270.0100.04014.78
5.3.260.0000.04014.86
5.3.250.0030.04314.77
5.3.240.0030.03714.77
5.3.230.0030.03714.66
5.3.220.0070.07314.70
5.3.210.0070.06314.70
5.3.200.0030.05314.63
5.3.190.0000.04014.68
5.3.180.0070.08014.70
5.3.170.0030.05314.72
5.3.160.0070.06014.80
5.3.150.0070.06014.82
5.3.140.0030.06314.82
5.3.130.0100.06314.68
5.3.120.0070.07014.58
5.3.110.0070.07714.61
5.3.100.0030.04314.04
5.3.90.0030.03714.08
5.3.80.0030.05314.15
5.3.70.0030.04014.16
5.3.60.0070.06314.13
5.3.50.0070.07014.02
5.3.40.0100.05713.91
5.3.30.0070.03314.02
5.3.20.0070.03013.95
5.3.10.0070.03013.82
5.3.00.0070.07013.70
5.2.170.0000.03012.53
5.2.160.0000.06712.53
5.2.150.0000.04012.53
5.2.140.0000.06712.53
5.2.130.0130.05312.53
5.2.120.0030.03012.53
5.2.110.0070.04312.53
5.2.100.0070.06312.53
5.2.90.0000.03712.53
5.2.80.0070.06012.53
5.2.70.0000.04712.53
5.2.60.0000.04712.53
5.2.50.0000.04712.53
5.2.40.0030.03312.53
5.2.30.0100.05312.53
5.2.20.0070.05712.53
5.2.10.0030.03012.53
5.2.00.0070.04712.53
5.1.60.0100.03312.53
5.1.50.0030.05712.53
5.1.40.0130.04312.53
5.1.30.0170.02012.53
5.1.20.0070.04712.53
5.1.10.0030.04312.53
5.1.00.0000.04312.53
5.0.50.0070.03012.53
5.0.40.0000.04312.53
5.0.30.0030.04712.53
5.0.20.0000.05012.53
5.0.10.0070.04012.53
5.0.00.0030.05712.53
4.4.90.0030.01712.53
4.4.80.0000.03012.53
4.4.70.0070.03012.53
4.4.60.0000.03312.53
4.4.50.0000.03312.53
4.4.40.0070.04012.53
4.4.30.0030.03312.53
4.4.20.0070.03012.53
4.4.10.0030.01712.53
4.4.00.0030.02712.53
4.3.110.0000.03712.53
4.3.100.0030.02712.53
4.3.90.0000.03012.53
4.3.80.0000.04712.53
4.3.70.0000.02012.53
4.3.60.0000.03312.53
4.3.50.0030.02312.53
4.3.40.0030.04312.53
4.3.30.0000.03712.53
4.3.20.0000.03012.53
4.3.10.0070.02712.53
4.3.00.0070.01712.53

preferences:
57.73 ms | 401 KiB | 5 Q