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( $children, $key, $value ); 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.0120.00918.80
8.3.50.0140.00521.14
8.3.40.0100.01018.70
8.3.30.0130.00618.92
8.3.20.0040.00418.89
8.3.10.0060.00320.79
8.3.00.0050.00323.73
8.2.180.0170.00316.88
8.2.170.0040.01522.96
8.2.160.0000.01422.32
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0110.00418.22
8.2.110.0060.00622.45
8.2.100.0110.00018.03
8.2.90.0040.00419.42
8.2.80.0050.00317.97
8.2.70.0040.00417.75
8.2.60.0030.00518.05
8.2.50.0050.00318.29
8.2.40.0000.00918.12
8.2.30.0000.00820.04
8.2.20.0030.00517.82
8.2.10.0040.00417.91
8.2.00.0080.00017.94
8.1.280.0110.01125.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0000.00923.00
8.1.230.0000.01217.70
8.1.220.0000.00817.74
8.1.210.0030.00718.77
8.1.200.0030.00617.38
8.1.190.0000.01117.35
8.1.180.0060.00318.10
8.1.170.0050.00319.00
8.1.160.0040.00419.16
8.1.150.0040.00418.84
8.1.140.0040.00417.55
8.1.130.0030.00317.99
8.1.120.0040.00417.57
8.1.110.0030.00517.61
8.1.100.0040.00417.74
8.1.90.0020.00517.67
8.1.80.0000.00817.74
8.1.70.0000.00817.57
8.1.60.0040.00817.73
8.1.50.0050.00317.59
8.1.40.0050.00317.75
8.1.30.0050.00317.89
8.1.20.0050.00317.71
8.1.10.0050.00317.81
8.1.00.0030.00517.79
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.61
8.0.270.0000.00717.47
8.0.260.0040.00417.02
8.0.250.0030.00517.16
8.0.240.0060.00317.11
8.0.230.0000.00717.22
8.0.220.0040.00416.99
8.0.210.0070.00016.95
8.0.200.0040.00417.20
8.0.190.0080.00017.07
8.0.180.0000.00816.97
8.0.170.0080.00016.95
8.0.160.0050.00217.08
8.0.150.0000.00817.12
8.0.140.0000.00817.03
8.0.130.0060.00013.50
8.0.120.0000.00816.97
8.0.110.0060.00317.17
8.0.100.0040.00417.11
8.0.90.0000.00717.02
8.0.80.0090.00617.01
8.0.70.0000.00817.11
8.0.60.0000.00717.04
8.0.50.0000.00817.08
8.0.30.0120.00917.23
8.0.20.0100.01217.40
8.0.10.0050.00217.02
8.0.00.0150.00916.92
7.4.330.0030.00314.94
7.4.320.0060.00016.76
7.4.300.0000.00716.89
7.4.290.0080.00016.72
7.4.280.0080.00016.71
7.4.270.0030.00316.74
7.4.260.0000.00613.46
7.4.250.0030.00516.59
7.4.240.0040.00416.71
7.4.230.0050.00216.91
7.4.220.0100.01016.68
7.4.210.0120.00416.85
7.4.200.0070.00016.58
7.4.190.0000.00716.88
7.4.160.0050.01516.66
7.4.150.0140.00717.40
7.4.140.0060.01117.86
7.4.130.0150.00616.55
7.4.120.0120.00816.78
7.4.110.0060.01316.92
7.4.100.0180.00616.86
7.4.90.0120.00616.79
7.4.80.0120.00919.04
7.4.70.0190.00316.45
7.4.60.0110.01116.66
7.4.50.0000.00616.85
7.4.40.0130.00322.27
7.4.30.0060.01316.70
7.4.00.0070.01015.01
7.3.330.0030.00213.30
7.3.320.0000.00613.46
7.3.310.0000.00716.50
7.3.300.0000.00716.49
7.3.290.0060.00916.51
7.3.280.0070.01116.50
7.3.270.0000.01817.40
7.3.260.0110.01018.24
7.3.250.0100.01216.62
7.3.240.0110.01416.85
7.3.230.0060.01216.55
7.3.210.0140.00716.55
7.3.200.0140.00519.39
7.3.190.0070.01316.71
7.3.180.0140.00516.81
7.3.170.0060.00916.72
7.3.160.0110.00816.48
7.3.120.0060.00915.04
7.3.110.0100.00714.78
7.3.100.0070.00714.81
7.3.90.0030.00914.82
7.3.80.0070.01114.87
7.3.70.0060.00914.84
7.3.60.0090.00615.00
7.3.50.0000.01014.91
7.3.40.0080.00414.68
7.3.30.0000.01214.91
7.3.20.0100.00316.68
7.3.10.0030.01016.87
7.3.00.0070.00716.79
7.2.330.0120.00916.86
7.2.320.0110.00717.09
7.2.310.0190.00316.93
7.2.300.0140.00616.70
7.2.290.0060.01417.06
7.2.250.0030.01414.90
7.2.240.0070.01315.43
7.2.230.0110.00715.27
7.2.220.0030.00915.36
7.2.210.0080.01115.11
7.2.200.0110.00015.26
7.2.190.0140.00015.13
7.2.180.0070.01015.26
7.2.170.0030.01215.26
7.2.00.0080.00819.60
7.1.330.0100.00315.55
7.1.320.0040.00715.91
7.1.310.0070.01115.87
7.1.300.0080.00615.54
7.1.290.0110.00415.78
7.1.280.0080.00515.83
7.1.270.0150.00015.61
7.1.260.0000.01615.99
7.1.200.0030.00815.83
7.1.100.0040.00818.15
7.1.70.0000.01117.30
7.1.60.0030.02119.40
7.1.50.0040.00816.96
7.1.00.0030.06022.43
7.0.200.0030.00617.01
7.0.140.0100.06022.03
7.0.60.0030.08020.07
7.0.50.0030.07017.94
7.0.40.0170.05717.93
7.0.30.0130.06017.92
7.0.20.0130.03017.85
7.0.10.0100.03717.84
7.0.00.0100.03717.89
5.6.280.0070.07021.05
5.6.210.0230.06720.83
5.6.200.0100.04318.29
5.6.190.0000.06318.26
5.6.180.0170.06718.28
5.6.170.0100.08018.23
5.6.160.0070.06718.32
5.6.150.0000.08018.32
5.6.140.0100.08018.30
5.6.130.0000.05718.38
5.6.120.0030.08718.30
5.6.110.0070.08718.27
5.6.100.0100.04018.21
5.6.90.0030.06318.34
5.6.80.0070.03717.73
5.6.70.0000.04317.64
5.6.60.0000.04717.69
5.6.50.0000.06317.64
5.6.40.0000.04317.71
5.6.30.0300.06317.74
5.6.20.0070.05317.66
5.6.10.0170.07317.73
5.6.00.0030.04317.62
5.5.350.4270.04320.40
5.5.340.0100.05018.03
5.5.330.0030.08318.13
5.5.320.0030.08318.18
5.5.310.0070.07018.12
5.5.300.0030.04318.20
5.5.290.0000.04718.09
5.5.280.0030.05718.07
5.5.270.0030.08018.05
5.5.260.0000.04318.08
5.5.250.0000.08017.84
5.5.240.0000.05317.51
5.5.230.0030.04017.56
5.5.220.0070.04317.58
5.5.210.0030.04017.47
5.5.200.0070.06017.38
5.5.190.0030.06017.44
5.5.180.0000.04317.34
5.5.160.0000.06317.50
5.5.150.0000.04017.41
5.5.140.0070.07317.34
5.5.130.0030.03717.44
5.5.120.0070.03317.34
5.5.110.0030.04317.40
5.5.100.0070.04717.28
5.5.90.0100.03017.41
5.5.80.0000.05017.43
5.5.70.0070.03717.32
5.5.60.0070.05317.39
5.5.50.0100.04017.35
5.5.40.0030.07717.45
5.5.30.0100.05017.41
5.5.20.0100.06717.35
5.5.10.0070.07717.40
5.5.00.0000.06317.33
5.4.450.0000.04319.45
5.4.440.0100.06019.54
5.4.430.0070.04319.34
5.4.420.0170.05319.59
5.4.410.0000.05319.54
5.4.400.0070.04319.19
5.4.390.0100.03319.27
5.4.380.0130.07019.26
5.4.370.0070.07319.12
5.4.360.0070.07319.05
5.4.350.0030.04019.23
5.4.340.0030.06319.18
5.4.320.0070.06019.06
5.4.310.0000.04019.21
5.4.300.0070.05719.22
5.4.290.0000.04319.18
5.4.280.0000.07719.11
5.4.270.0130.03318.98
5.4.260.0000.04019.04
5.4.250.0130.03319.18
5.4.240.0070.03319.25
5.4.230.0030.03719.02
5.4.220.0000.08019.22
5.4.210.0130.06019.02
5.4.200.0070.03319.25
5.4.190.0030.07719.16
5.4.180.0070.07319.21
5.4.170.0030.06019.16
5.4.160.0000.04319.00
5.4.150.0030.08019.22
5.4.140.0130.06716.42
5.4.130.0030.06316.60
5.4.120.0100.06716.71
5.4.110.0000.05316.53
5.4.100.0000.07716.71
5.4.90.0030.07716.53
5.4.80.0130.06316.46
5.4.70.0030.07716.51
5.4.60.0170.03316.63
5.4.50.0100.04316.50
5.4.40.0100.07016.68
5.4.30.0100.07316.48
5.4.20.0070.04316.49
5.4.10.0070.03316.45
5.4.00.0070.04015.92
5.3.290.0000.04314.90
5.3.280.0070.04714.74
5.3.270.0130.07714.67
5.3.260.0130.07314.68
5.3.250.0100.06314.72
5.3.240.0000.04714.71
5.3.230.0070.04314.73
5.3.220.0030.08314.69
5.3.210.0100.07314.61
5.3.200.0000.04014.57
5.3.190.0070.08314.81
5.3.180.0100.07014.71
5.3.170.0230.03714.60
5.3.160.0070.07314.70
5.3.150.0170.03714.67
5.3.140.0100.05014.70
5.3.130.0130.07014.71
5.3.120.0100.06714.71
5.3.110.0030.06714.80
5.3.100.0070.06014.07
5.3.90.0030.06714.13
5.3.80.0100.03014.27
5.3.70.0100.03014.25
5.3.60.0030.04014.11
5.3.50.0000.04314.23
5.3.40.0030.04014.24
5.3.30.0070.03314.05
5.3.20.0030.07713.82
5.3.10.0070.07313.62
5.3.00.0000.05013.78
5.2.170.0030.06011.25
5.2.160.0000.03011.30
5.2.150.0000.03311.43
5.2.140.0030.04711.38
5.2.130.0130.04311.08
5.2.120.0130.05311.26
5.2.110.0100.05011.25
5.2.100.0070.05311.07
5.2.90.0070.05711.16
5.2.80.0030.06311.21
5.2.70.0070.04011.05
5.2.60.0000.03711.18
5.2.50.0070.06011.17
5.2.40.0000.06310.97
5.2.30.0070.06011.17
5.2.20.0130.05011.25
5.2.10.0030.05011.02
5.2.00.0030.04310.79
5.1.60.0070.04010.24
5.1.50.0030.04010.14
5.1.40.0070.02710.08
5.1.30.0030.02710.47
5.1.20.0000.03310.48
5.1.10.0000.03710.15
5.1.00.0030.04710.06
5.0.50.0100.0238.54
5.0.40.0070.0438.38
5.0.30.0000.0678.46
5.0.20.0070.0408.23
5.0.10.0000.0478.16
5.0.00.0000.0438.27
4.4.90.0000.0207.84
4.4.80.0030.0377.85
4.4.70.0030.0377.87
4.4.60.0100.0277.87
4.4.50.0000.0407.87
4.4.40.0000.0407.87
4.4.30.0000.0207.87
4.4.20.0070.0337.87
4.4.10.0030.0237.87
4.4.00.0070.0537.87
4.3.110.0030.0277.87
4.3.100.0000.0277.87
4.3.90.0000.0277.87
4.3.80.0000.0577.87
4.3.70.0070.0307.87
4.3.60.0000.0277.87
4.3.50.0000.0407.87
4.3.40.0070.0337.87
4.3.30.0000.0177.87
4.3.20.0000.0237.87
4.3.10.0030.0177.87
4.3.00.0000.0237.87

preferences:
41.11 ms | 401 KiB | 5 Q