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 $r) var_dump($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.0140.00317.00
8.3.50.0100.01016.86
8.3.40.0060.00919.01
8.3.30.0000.01418.97
8.3.20.0030.00618.82
8.3.10.0060.00618.85
8.3.00.0000.01119.37
8.2.180.0140.00016.75
8.2.170.0100.00722.96
8.2.160.0070.00718.83
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00321.31
8.2.110.0090.00019.44
8.2.100.0080.00419.79
8.2.90.0080.00019.33
8.2.80.0030.00517.97
8.2.70.0030.00617.75
8.2.60.0030.00518.18
8.2.50.0040.00418.10
8.2.40.0050.00318.34
8.2.30.0000.00917.90
8.2.20.0030.00617.85
8.2.10.0000.00718.02
8.2.00.0000.00717.92
8.1.280.0070.01425.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0030.00622.27
8.1.230.0040.00817.95
8.1.220.0040.00417.90
8.1.210.0000.00818.77
8.1.200.0000.00917.38
8.1.190.0050.00317.47
8.1.180.0060.00318.10
8.1.170.0050.00318.69
8.1.160.0040.00419.23
8.1.150.0040.00418.74
8.1.140.0070.00017.64
8.1.130.0000.00717.80
8.1.120.0000.00817.73
8.1.110.0040.00417.69
8.1.100.0040.00417.72
8.1.90.0000.00717.63
8.1.80.0040.00317.60
8.1.70.0080.00017.57
8.1.60.0030.00517.64
8.1.50.0030.00517.70
8.1.40.0050.00517.80
8.1.30.0000.00917.73
8.1.20.0070.00017.79
8.1.10.0000.00717.78
8.1.00.0000.00817.75
8.0.300.0000.00818.77
8.0.290.0000.00717.00
8.0.280.0070.00018.62
8.0.270.0040.00417.46
8.0.260.0030.00317.00
8.0.250.0030.00517.24
8.0.240.0040.00417.07
8.0.230.0050.00417.20
8.0.220.0000.00717.01
8.0.210.0070.00017.13
8.0.200.0030.00317.08
8.0.190.0030.00517.20
8.0.180.0040.00417.05
8.0.170.0030.00616.89
8.0.160.0020.00516.96
8.0.150.0000.00716.91
8.0.140.0020.00817.01
8.0.130.0050.00313.50
8.0.120.0030.00617.13
8.0.110.0070.00017.14
8.0.100.0000.00717.17
8.0.90.0040.00417.04
8.0.80.0000.01517.10
8.0.70.0000.00717.21
8.0.60.0000.00816.98
8.0.50.0000.00717.02
8.0.30.0080.00817.15
8.0.20.0090.01417.35
8.0.10.0040.00417.15
8.0.00.0080.00917.03
7.4.330.0000.00513.29
7.4.320.0030.00316.74
7.4.300.0000.00716.79
7.4.290.0060.00316.75
7.4.280.0030.00416.82
7.4.270.0030.00316.83
7.4.260.0000.00713.49
7.4.250.0060.00316.60
7.4.240.0030.00316.61
7.4.230.0030.00316.79
7.4.220.0150.00616.71
7.4.210.0090.01216.92
7.4.200.0030.00516.73
7.4.190.0060.00316.58
7.4.160.0080.00816.64
7.4.150.0100.00916.81
7.4.140.0210.00317.86
7.4.130.0120.00916.91
7.4.120.0100.00716.72
7.4.110.0070.01016.68
7.4.100.0030.01416.74
7.4.90.0080.01116.83
7.4.80.0150.00716.90
7.4.70.0160.00816.63
7.4.60.0120.00616.79
7.4.50.0050.00016.63
7.4.40.0100.00716.56
7.4.30.0100.00716.74
7.4.00.0060.00815.11
7.3.330.0000.00613.59
7.3.320.0030.00313.50
7.3.310.0030.00316.63
7.3.300.0030.00316.56
7.3.290.0070.00816.50
7.3.280.0110.00416.50
7.3.270.0090.01216.54
7.3.260.0060.01216.54
7.3.240.0180.00416.52
7.3.230.0090.00916.73
7.3.210.0130.00316.57
7.3.200.0070.01016.73
7.3.190.0090.00716.45
7.3.180.0120.00316.82
7.3.170.0000.02116.57
7.3.160.0090.00916.56
7.3.120.0100.00714.89
7.2.330.0100.00716.86
7.2.320.0030.01316.84
7.2.310.0110.00816.90
7.2.300.0060.01016.68
7.2.290.0090.01216.89
7.2.00.0030.00919.56
7.1.100.0300.00716.42
7.1.70.0040.01117.19
7.1.60.0000.02219.30
7.1.50.0100.01317.11
7.1.00.0000.04022.52
7.0.200.0070.00316.71
7.0.140.0070.07022.20
7.0.120.0070.03022.14
7.0.60.0170.05719.99
7.0.50.0200.07317.93
7.0.40.0100.07320.37
7.0.30.0230.05720.23
7.0.20.0200.06720.28
7.0.10.0230.03720.31
7.0.00.0070.08320.27
5.6.280.0070.07021.02
5.6.210.0130.07020.71
5.6.200.0030.07018.31
5.6.190.0000.06020.41
5.6.180.0330.03320.75
5.6.170.0200.03720.70
5.6.160.0100.08320.68
5.6.150.0030.08718.32
5.6.140.0100.07718.35
5.6.130.0000.04318.28
5.6.120.0100.08021.20
5.6.110.0130.06721.08
5.6.100.0000.04321.00
5.6.90.0130.04021.16
5.6.80.0100.07720.49
5.6.70.4300.03320.43
5.5.350.0230.07020.55
5.5.340.0070.07318.15
5.5.330.0030.07320.42
5.5.320.0200.06720.34
5.5.310.0400.07020.38
5.5.300.0070.05318.11
5.5.290.0100.07318.16
5.5.280.0030.08720.92
5.5.270.0070.06720.84
5.5.260.0070.06320.94
5.5.250.0130.07320.91
5.5.240.0200.06720.31
5.4.450.0030.04019.52
5.4.440.0070.04719.68
5.4.430.0030.05719.47
5.4.420.0000.05719.60
5.4.410.0100.07319.43
5.4.400.0030.08018.93
5.4.390.0100.07018.95
5.4.380.0030.04718.91
5.4.370.0100.07019.06
5.4.360.0100.06719.39
5.4.350.0070.06319.45
5.4.340.0070.08019.38
5.4.320.0070.07018.95
5.4.310.0100.07018.94
5.4.300.0170.06719.29
5.4.290.0100.05019.05
5.4.280.0070.07718.92
5.4.270.0030.05318.93
5.4.260.0100.04719.29
5.4.250.0000.05018.92
5.4.240.0130.06319.07
5.4.230.0100.06319.15
5.4.220.0030.07319.33
5.4.210.0070.08019.01
5.4.200.0100.05319.07
5.4.190.0070.07018.91
5.4.180.0030.07019.27
5.4.170.0030.08319.43
5.4.160.0070.06019.36
5.4.150.0030.04019.03
5.4.140.0030.04716.60
5.4.130.0070.04016.62
5.4.120.0070.06016.45
5.4.110.0130.04316.55
5.4.100.0100.03316.42
5.4.90.0000.07716.51
5.4.80.0070.04016.78
5.4.70.0030.05016.70
5.4.60.0030.07316.61
5.4.50.0170.06016.57
5.4.40.0170.05716.53
5.4.30.0070.04716.55
5.4.20.0030.05716.48
5.4.10.0200.06316.52
5.4.00.0030.05016.07
5.3.290.0100.08014.80
5.3.280.0030.06014.75
5.3.270.0070.08014.81
5.3.260.0100.05314.75
5.3.250.0100.07314.81
5.3.240.0030.08014.81
5.3.230.0030.07314.69
5.3.220.0070.08014.80
5.3.210.0100.04714.72
5.3.200.0000.05314.68
5.3.190.0030.08014.68
5.3.180.0070.06314.77
5.3.170.0030.05314.70
5.3.160.0030.07014.79
5.3.150.0130.04014.71
5.3.140.0130.05314.79
5.3.130.0070.04014.75
5.3.120.0130.05314.66
5.3.110.0100.06014.55
5.3.100.0130.07014.21
5.3.90.0100.06014.17
5.3.80.0070.04714.13
5.3.70.0000.06314.06
5.3.60.0070.04714.10
5.3.50.0030.04314.08
5.3.40.0030.07713.95
5.3.30.0130.06714.11
5.3.20.0070.04313.93
5.3.10.0030.04713.66
5.3.00.0100.05713.67
5.2.170.0100.02711.18
5.2.160.0000.04011.27
5.2.150.0070.06011.20
5.2.140.0030.04711.39
5.2.130.0070.04311.14
5.2.120.0030.06011.34
5.2.110.0070.05711.24
5.2.100.0030.05311.13
5.2.90.0000.06711.30
5.2.80.0000.03711.12
5.2.70.0070.05011.09
5.2.60.0070.05711.17
5.2.50.0030.03711.05
5.2.40.0100.06011.00
5.2.30.0070.05711.07
5.2.20.0100.04711.00
5.2.10.0030.03310.99
5.2.00.0030.02710.87
5.1.60.0100.02010.14
5.1.50.0000.03310.13
5.1.40.0000.03010.10
5.1.30.0130.03010.48
5.1.20.0030.03010.35
5.1.10.0000.05010.18
5.1.00.0030.04710.30
5.0.50.0030.0378.68
5.0.40.0000.0308.63
5.0.30.0030.0478.27
5.0.20.0000.0478.32
5.0.10.0000.0478.15
5.0.00.0170.0278.27
4.4.90.0000.0407.82
4.4.80.0030.0307.82
4.4.70.0000.0307.82
4.4.60.0000.0207.82
4.4.50.0030.0177.82
4.4.40.0000.0537.82
4.4.30.0030.0337.82
4.4.20.0100.0107.82
4.4.10.0070.0307.82
4.4.00.0100.0407.82
4.3.110.0000.0207.82
4.3.100.0030.0307.82
4.3.90.0000.0307.82
4.3.80.0030.0277.82
4.3.70.0070.0307.82
4.3.60.0000.0377.82
4.3.50.0000.0377.82
4.3.40.0070.0407.82
4.3.30.0070.0177.82
4.3.20.0000.0407.82
4.3.10.0000.0237.82
4.3.00.0000.0337.82

preferences:
41.46 ms | 401 KiB | 5 Q