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, $value->getName() ); 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.0130.01016.61
8.3.50.0200.01117.50
8.3.40.0030.01319.09
8.3.30.0040.01118.86
8.3.20.0040.00418.68
8.3.10.0030.00620.65
8.3.00.0060.00319.38
8.2.180.0090.00618.66
8.2.170.0140.00422.96
8.2.160.0090.00619.16
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0040.00420.01
8.2.110.0040.00720.92
8.2.100.0090.00317.97
8.2.90.0030.00719.76
8.2.80.0000.00819.37
8.2.70.0000.01017.88
8.2.60.0090.00318.05
8.2.50.0080.00018.07
8.2.40.0040.00418.34
8.2.30.0000.00818.21
8.2.20.0080.00317.73
8.2.10.0050.00218.03
8.2.00.0000.00717.84
8.1.280.0040.01825.92
8.1.270.0070.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00322.78
8.1.230.0090.00321.10
8.1.220.0040.00418.00
8.1.210.0050.00319.14
8.1.200.0030.00617.48
8.1.190.0000.00817.65
8.1.180.0030.00618.10
8.1.170.0060.00319.11
8.1.160.0080.00019.15
8.1.150.0000.00818.91
8.1.140.0040.00417.68
8.1.130.0030.00317.94
8.1.120.0060.00317.73
8.1.110.0030.00517.71
8.1.100.0000.00817.76
8.1.90.0040.00417.72
8.1.80.0040.00417.75
8.1.70.0030.00317.65
8.1.60.0040.00417.70
8.1.50.0000.00717.75
8.1.40.0040.00417.68
8.1.30.0050.00517.70
8.1.20.0000.00817.81
8.1.10.0040.00417.86
8.1.00.0030.00517.62
8.0.300.0000.00920.28
8.0.290.0040.00417.00
8.0.280.0050.00318.73
8.0.270.0070.00017.45
8.0.260.0000.00716.98
8.0.250.0000.00817.05
8.0.240.0030.00317.10
8.0.230.0000.00817.17
8.0.220.0030.00317.12
8.0.210.0000.00717.04
8.0.200.0030.00317.26
8.0.190.0050.00317.24
8.0.180.0040.00417.20
8.0.170.0000.00916.91
8.0.160.0070.00017.18
8.0.150.0040.00417.17
8.0.140.0050.00316.98
8.0.130.0050.00013.63
8.0.120.0040.00417.00
8.0.110.0040.00417.06
8.0.100.0060.00317.04
8.0.90.0000.00717.11
8.0.80.0030.01317.11
8.0.70.0000.00716.91
8.0.60.0040.00417.20
8.0.50.0080.00017.03
8.0.30.0100.00716.93
8.0.20.0090.01317.30
8.0.10.0040.00417.09
8.0.00.0040.01717.09
7.4.330.0060.00013.25
7.4.320.0030.00316.93
7.4.300.0070.00016.79
7.4.290.0030.00316.74
7.4.280.0060.00316.66
7.4.270.0030.00316.75
7.4.260.0030.00313.42
7.4.250.0030.00616.72
7.4.240.0000.00716.90
7.4.230.0030.00316.68
7.4.220.0070.02016.73
7.4.210.0110.00416.84
7.4.200.0000.00716.59
7.4.190.0030.00316.99
7.4.160.0090.00916.75
7.4.150.0140.01116.82
7.4.140.0160.00016.64
7.4.130.0070.01816.82
7.4.120.0170.00716.82
7.4.110.0030.01516.75
7.4.100.0060.01216.59
7.4.90.0120.00816.56
7.4.80.0090.01219.39
7.4.70.0040.01316.65
7.4.60.0160.00016.70
7.4.50.0000.00916.77
7.4.40.0040.00816.47
7.4.30.0060.01016.65
7.4.00.0050.01115.09
7.3.330.0050.00313.33
7.3.320.0000.00713.44
7.3.310.0040.00416.63
7.3.300.0030.00316.50
7.3.290.0060.00816.53
7.3.280.0070.01016.48
7.3.270.0090.00916.72
7.3.260.0090.00916.70
7.3.250.0160.00716.57
7.3.240.0060.01616.77
7.3.230.0080.00816.55
7.3.210.0040.01516.70
7.3.200.0130.00316.71
7.3.190.0100.01016.73
7.3.180.0060.00916.63
7.3.170.0100.00716.49
7.3.160.0130.00316.89
7.3.120.0040.01315.04
7.3.110.0070.01014.84
7.3.100.0060.00914.66
7.3.90.0000.01314.84
7.3.80.0100.00314.87
7.3.70.0070.01015.03
7.3.60.0060.00615.00
7.3.50.0150.00314.71
7.3.40.0060.00914.57
7.3.30.0060.00614.96
7.3.20.0030.00616.66
7.3.10.0120.00416.95
7.3.00.0060.01216.70
7.2.330.0150.01116.72
7.2.320.0100.01016.73
7.2.310.0070.01416.91
7.2.300.0100.00717.05
7.2.290.0170.00616.87
7.2.250.0120.00615.12
7.2.240.0060.01215.09
7.2.230.0060.01015.21
7.2.220.0040.00815.21
7.2.210.0130.00315.21
7.2.200.0060.00914.97
7.2.190.0070.00715.26
7.2.180.0060.00915.35
7.2.170.0090.01215.09
7.2.60.0000.01416.50
7.2.00.0030.00919.44
7.1.330.0070.00716.10
7.1.320.0070.00715.82
7.1.310.0060.00915.85
7.1.300.0060.00615.52
7.1.290.0060.01515.86
7.1.280.0040.00815.82
7.1.270.0030.00715.79
7.1.260.0060.01215.90
7.1.200.0040.01115.67
7.1.100.0070.00718.10
7.1.70.0030.00617.32
7.1.60.0140.01019.30
7.1.50.0100.01316.99
7.1.00.0000.03722.52
7.0.200.0000.00816.98
7.0.140.0000.08022.04
7.0.120.0100.06722.19
7.0.60.0070.04320.10
7.0.50.0030.04017.96
7.0.40.0200.07320.43
7.0.30.0430.06020.20
7.0.20.0270.07720.29
7.0.10.0070.06020.37
7.0.00.0000.04720.30
5.6.280.0030.07321.06
5.6.210.0070.04320.57
5.6.200.0000.04318.28
5.6.190.0070.04020.41
5.6.180.0200.03720.81
5.6.170.0300.04320.78
5.6.160.0070.08720.63
5.6.150.0100.07718.28
5.6.140.0100.08718.29
5.6.130.0030.06018.37
5.6.120.0030.09020.89
5.6.110.0030.07721.03
5.6.100.0130.07721.03
5.6.90.0200.07320.99
5.6.80.0070.03720.60
5.5.350.0030.05020.43
5.5.340.0130.07318.16
5.5.330.0030.07320.29
5.5.320.0070.08020.33
5.5.310.0270.04020.35
5.5.300.0030.04318.16
5.5.290.0030.05018.20
5.5.280.0030.04020.77
5.5.270.0130.07720.75
5.5.260.0070.07720.78
5.5.250.0100.08320.74
5.5.240.0070.06320.45
5.4.450.0000.08019.26
5.4.440.0130.07319.55
5.4.430.0100.03719.66
5.4.420.0070.05719.60
5.4.410.0170.06719.27
5.4.400.0070.07718.92
5.4.390.0100.07318.93
5.4.380.0100.07018.95
5.4.370.0130.06319.34
5.4.360.0070.06019.29
5.4.350.0030.08319.08
5.4.340.0070.08019.23
5.4.320.0100.07318.94
5.4.310.0030.07718.93
5.4.300.0100.07719.21
5.4.290.0100.07719.44
5.4.280.0070.05019.37
5.4.270.0070.07719.38
5.4.260.0030.05019.18
5.4.250.0030.08019.18
5.4.240.0030.08318.96
5.4.230.0070.07319.05
5.4.220.0030.06319.18
5.4.210.0030.07719.05
5.4.200.0070.06319.28
5.4.190.0000.07319.36
5.4.180.0030.04318.91
5.4.170.0170.06019.27
5.4.160.0070.05019.25
5.4.150.0070.07719.18
5.4.140.0170.03716.46
5.4.130.0030.05016.45
5.4.120.0130.03716.43
5.4.110.0000.05316.53
5.4.100.0070.04316.58
5.4.90.0100.04016.55
5.4.80.0070.06016.40
5.4.70.0130.05316.54
5.4.60.0030.08016.77
5.4.50.0000.07016.55
5.4.40.0100.06316.49
5.4.30.0130.06316.59
5.4.20.0000.08016.55
5.4.10.0100.05716.48
5.4.00.0030.05016.13
5.3.290.0030.08014.81
5.3.280.0130.06314.80
5.3.270.0070.08014.71
5.3.260.0100.07014.72
5.3.250.0100.07014.81
5.3.240.0100.06014.73
5.3.230.0100.07314.71
5.3.220.0070.05014.66
5.3.210.0030.07314.68
5.3.200.0100.08014.66
5.3.190.0070.05714.70
5.3.180.0000.07014.68
5.3.170.0030.04314.69
5.3.160.0030.06014.79
5.3.150.0100.07314.56
5.3.140.0100.06714.56
5.3.130.0070.08014.66
5.3.120.0070.06714.68
5.3.110.0070.08014.75
5.3.100.0000.08314.27
5.3.90.0030.07714.16
5.3.80.0030.08014.22
5.3.70.0100.07014.20
5.3.60.0030.06314.13
5.3.50.0070.08314.19
5.3.40.0030.08314.16
5.3.30.0100.06314.05
5.3.20.0070.03713.93
5.3.10.0030.08013.86
5.3.00.0070.04013.79
5.2.170.0000.06711.18
5.2.160.0070.06311.28
5.2.150.0130.05711.30
5.2.140.0100.04011.27
5.2.130.0000.06011.24
5.2.120.0030.06311.33
5.2.110.0000.04711.25
5.2.100.0170.03011.18
5.2.90.0100.06011.13
5.2.80.0030.06011.23
5.2.70.0000.05711.19
5.2.60.0030.04011.23
5.2.50.0000.03011.17
5.2.40.0030.02711.09
5.2.30.0000.03311.17
5.2.20.0000.03011.09
5.2.10.0030.02711.04
5.2.00.0000.03010.87
5.1.60.0000.02710.17
5.1.50.0000.02710.16
5.1.40.0070.02010.03
5.1.30.0030.02310.44
5.1.20.0030.03010.39
5.1.10.0070.02310.18
5.1.00.0000.05010.22
5.0.50.0000.0238.70
5.0.40.0030.0208.50
5.0.30.0100.0278.27
5.0.20.0000.0238.36
5.0.10.0000.0208.38
5.0.00.0000.0308.31
4.4.90.0000.0407.93
4.4.80.0000.0177.93
4.4.70.0030.0137.93
4.4.60.0000.0177.93
4.4.50.0000.0177.93
4.4.40.0000.0237.93
4.4.30.0000.0177.93
4.4.20.0000.0177.93
4.4.10.0000.0207.93
4.4.00.0030.0507.93
4.3.110.0000.0177.93
4.3.100.0000.0377.93
4.3.90.0000.0207.93
4.3.80.0000.0277.93
4.3.70.0000.0137.93
4.3.60.0000.0137.93
4.3.50.0030.0137.93
4.3.40.0000.0237.93
4.3.30.0000.0177.93
4.3.20.0030.0137.93
4.3.10.0000.0177.93
4.3.00.0030.0137.93

preferences:
37.37 ms | 401 KiB | 5 Q