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); var_dump($obj->firstChild()->firstChild()->firstChild()[1]);

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.0150.00616.74
8.3.50.0150.00522.15
8.3.40.0040.01119.09
8.3.30.0110.00319.25
8.3.20.0040.00420.41
8.3.10.0050.00323.90
8.3.00.0040.00419.50
8.2.180.0060.01018.67
8.2.170.0060.00922.96
8.2.160.0100.00320.65
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0110.00426.16
8.2.120.0080.00022.46
8.2.110.0060.00319.39
8.2.100.0060.00618.09
8.2.90.0040.00419.20
8.2.80.0040.00418.18
8.2.70.0050.00317.75
8.2.60.0030.00518.18
8.2.50.0040.00418.07
8.2.40.0000.00918.59
8.2.30.0040.00418.33
8.2.20.0000.00817.97
8.2.10.0040.00418.36
8.2.00.0060.00318.04
8.1.280.0100.00325.92
8.1.270.0060.00324.12
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00622.25
8.1.230.0100.00322.91
8.1.220.0000.00818.03
8.1.210.0040.00418.77
8.1.200.0000.01017.60
8.1.190.0030.00517.63
8.1.180.0040.00418.10
8.1.170.0080.00018.90
8.1.160.0020.00522.24
8.1.150.0040.00418.82
8.1.140.0040.00417.74
8.1.130.0050.00218.00
8.1.120.0000.00717.66
8.1.110.0040.00417.71
8.1.100.0040.00417.75
8.1.90.0000.00717.57
8.1.80.0000.00717.70
8.1.70.0070.00017.55
8.1.60.0030.00517.64
8.1.50.0050.00317.61
8.1.40.0000.00817.77
8.1.30.0000.00817.80
8.1.20.0040.00417.84
8.1.10.0030.00617.81
8.1.00.0000.00817.57
8.0.300.0040.00418.77
8.0.290.0040.00417.53
8.0.280.0040.00418.66
8.0.270.0000.00817.49
8.0.260.0060.00017.00
8.0.250.0070.00017.14
8.0.240.0030.00617.27
8.0.230.0000.00817.10
8.0.220.0040.00417.04
8.0.210.0000.00817.11
8.0.200.0030.00317.13
8.0.190.0070.00017.24
8.0.180.0000.00717.03
8.0.170.0000.00817.09
8.0.160.0070.00017.25
8.0.150.0070.00017.22
8.0.140.0060.00317.14
8.0.130.0000.00613.58
8.0.120.0030.00517.01
8.0.110.0040.00417.24
8.0.100.0040.00417.07
8.0.90.0040.00417.14
8.0.80.0070.01017.19
8.0.70.0040.00417.29
8.0.60.0000.00817.11
8.0.50.0080.00017.11
8.0.30.0150.00417.55
8.0.20.0150.00417.40
8.0.10.0000.00717.40
8.0.00.0050.01317.13
7.4.330.0070.00015.00
7.4.320.0000.00716.73
7.4.300.0070.00016.65
7.4.290.0000.00916.76
7.4.280.0000.00716.67
7.4.270.0030.00316.75
7.4.260.0000.00816.82
7.4.250.0080.00016.71
7.4.240.0050.00216.76
7.4.230.0040.00416.71
7.4.220.0100.00616.86
7.4.210.0060.01216.74
7.4.200.0000.00716.79
7.4.190.0070.00016.56
7.4.160.0170.00016.74
7.4.150.0080.01117.40
7.4.140.0150.00517.86
7.4.130.0060.01116.77
7.4.120.0060.01216.91
7.4.110.0110.00716.72
7.4.100.0080.01216.88
7.4.90.0100.00716.69
7.4.80.0110.00719.39
7.4.70.0030.01316.70
7.4.60.0000.01716.76
7.4.50.0050.00016.50
7.4.40.0050.00922.77
7.4.30.0170.00016.71
7.4.10.0120.00314.93
7.4.00.0080.00915.02
7.3.330.0000.00613.48
7.3.320.0030.00313.39
7.3.310.0040.00416.46
7.3.300.0070.00016.54
7.3.290.0040.01616.68
7.3.280.0080.01016.63
7.3.270.0110.00717.40
7.3.260.0110.00716.93
7.3.250.0160.00516.79
7.3.240.0060.01116.61
7.3.230.0040.01716.77
7.3.210.0140.00416.71
7.3.200.0090.00919.39
7.3.190.0030.01516.82
7.3.180.0110.01116.86
7.3.170.0100.01016.63
7.3.160.0070.01016.61
7.3.130.0070.01314.74
7.3.120.0060.01115.05
7.3.110.0090.00714.97
7.3.100.0080.00814.79
7.3.90.0080.00514.93
7.3.80.0080.00314.99
7.3.70.0030.00714.88
7.3.60.0050.00814.88
7.3.50.0030.01415.10
7.3.40.0050.00914.96
7.3.30.0100.00614.89
7.3.20.0090.00416.87
7.3.10.0030.01216.67
7.3.00.0040.00916.71
7.2.330.0100.00716.98
7.2.320.0190.00617.00
7.2.310.0140.00316.62
7.2.300.0120.00416.83
7.2.290.0070.01016.81
7.2.260.0090.00915.05
7.2.250.0030.01014.84
7.2.240.0080.00715.30
7.2.230.0060.01015.13
7.2.220.0030.00715.19
7.2.210.0060.00915.20
7.2.200.0020.01215.29
7.2.190.0020.01315.07
7.2.180.0090.00715.06
7.2.170.0060.01015.14
7.2.160.0050.01115.21
7.2.150.0060.00617.00
7.2.140.0060.01017.08
7.2.130.0050.00916.96
7.2.120.0060.00917.13
7.2.110.0080.00517.11
7.2.100.0030.01217.19
7.2.90.0100.00617.25
7.2.80.0060.00717.16
7.2.70.0080.00517.01
7.2.60.0060.00816.99
7.2.50.0040.01017.04
7.2.40.0060.00817.00
7.2.30.0050.01017.09
7.2.20.0050.01117.08
7.2.10.0070.00616.83
7.2.00.0080.00617.12
7.1.330.0070.00615.82
7.1.320.0030.01115.95
7.1.310.0030.01115.79
7.1.300.0080.00715.74
7.1.290.0030.00915.62
7.1.280.0070.00615.98
7.1.270.0020.01315.70
7.1.260.0110.00316.01
7.1.250.0060.00716.04
7.1.240.0100.00615.92
7.1.230.0040.00716.02
7.1.220.0040.00715.93
7.1.210.0070.01016.00
7.1.200.0070.00516.08
7.1.190.0030.01015.83
7.1.180.0070.01015.64
7.1.170.0100.00715.98
7.1.160.0000.01216.07
7.1.150.0000.01415.71
7.1.140.0080.00315.94
7.1.130.0070.00415.90
7.1.120.0000.01315.82
7.1.110.0000.01716.27
7.1.100.0030.01416.07
7.1.90.0040.00716.05
7.1.80.0040.01115.93
7.1.70.0060.00516.62
7.1.60.0040.01517.68
7.1.50.0070.01416.56
7.1.40.0130.00615.96
7.1.30.0070.00715.64
7.1.20.0000.01115.86
7.1.10.0040.01216.07
7.1.00.0050.04219.11
7.0.330.0030.00615.57
7.0.320.0030.00615.59
7.0.310.0060.00615.75
7.0.300.0030.01315.49
7.0.290.0030.01015.48
7.0.280.0040.00715.57
7.0.270.0040.00815.32
7.0.260.0030.00915.61
7.0.250.0030.00915.71
7.0.240.0000.00915.53
7.0.230.0080.00315.64
7.0.220.0070.00715.43
7.0.210.0110.00415.65
7.0.200.0080.00616.07
7.0.190.0030.01115.70
7.0.180.0160.00315.34
7.0.170.0040.01115.57
7.0.160.0070.00715.34
7.0.150.0070.00715.55
7.0.140.0130.03218.84
7.0.130.0000.01115.81
7.0.120.0000.01315.44
7.0.110.0040.00415.54
7.0.100.0000.01415.35
7.0.90.0090.00615.35
7.0.80.0040.01115.34
7.0.70.0070.00715.60
7.0.60.0030.04817.71
7.0.50.0030.04316.77
7.0.40.0000.03517.08
7.0.30.0170.02517.04
7.0.20.0120.03516.98
7.0.10.0030.03116.96
7.0.00.0020.05117.01
5.6.400.0000.00914.48
5.6.390.0030.01214.61
5.6.380.0110.00314.75
5.6.370.0000.00914.76
5.6.360.0080.00414.63
5.6.350.0060.00914.14
5.6.340.0100.00314.47
5.6.330.0060.00914.38
5.6.320.0040.01114.06
5.6.310.0060.00614.89
5.6.300.0110.00814.50
5.6.290.0040.01514.63
5.6.280.0000.04617.83
5.6.270.0060.00614.63
5.6.260.0000.01414.18
5.6.250.0030.01414.52
5.6.240.0100.00014.81
5.6.230.0040.01114.30
5.6.220.0060.00614.59
5.6.210.0030.04417.52
5.6.200.0020.02916.39
5.6.190.0080.04117.61
5.6.180.0160.02617.69
5.6.170.0200.02817.54
5.6.160.0020.05217.51
5.6.150.0100.04316.38
5.6.140.0050.02716.57
5.6.130.0060.04016.45
5.6.120.0110.02017.88
5.6.110.0050.05017.84
5.6.100.0130.04317.86
5.6.90.0120.04017.93
5.6.80.0050.04717.50
5.6.70.2330.02117.38
5.6.60.0000.01214.35
5.6.50.0030.00914.32
5.6.40.0040.00714.29
5.6.30.0030.00714.48
5.6.20.0120.00314.23
5.6.10.0110.00714.30
5.6.00.0060.00614.24
5.5.380.0070.00414.26
5.5.370.0110.00414.37
5.5.360.0070.00714.10
5.5.350.0050.04317.50
5.5.340.0050.04416.40
5.5.330.0020.03217.40
5.5.320.0140.02717.41
5.5.310.0120.02817.56
5.5.300.0060.02716.25
5.5.290.0030.02616.21
5.5.280.0060.02817.65
5.5.270.0020.02417.79
5.5.260.0050.05017.74
5.5.250.0060.02517.44
5.5.240.0070.03617.33
5.5.230.0000.00914.27
5.5.220.0030.00714.11
5.5.210.0040.00414.38
5.5.200.0040.01114.47
5.5.190.0100.00014.45
5.5.180.0130.00314.07
5.5.170.0090.00014.58
5.5.160.0130.00014.21
5.5.150.0110.00414.20
5.5.140.0120.00614.45
5.5.130.0090.00614.48
5.5.120.0000.01114.50
5.5.110.0100.00314.31
5.5.100.0060.00614.40
5.5.90.0040.00814.38
5.5.80.0000.01214.53
5.5.70.0100.00314.00
5.5.60.0060.00614.48
5.5.50.0000.01114.29
5.5.40.0080.00814.32
5.5.30.0060.00914.54
5.5.20.0030.00714.48
5.5.10.0030.01014.30
5.5.00.0050.00514.41
5.4.450.0130.02716.52
5.4.440.0220.03816.48
5.4.430.0150.03216.48
5.4.420.0170.01816.50
5.4.410.0220.02516.35
5.4.400.0180.03016.31
5.4.390.0200.02916.22
5.4.380.0150.02216.33
5.4.370.0120.02516.25
5.4.360.0170.03716.27
5.4.350.0180.02716.24
5.4.340.0210.03816.24
5.4.330.0030.00813.32
5.4.320.0250.02116.35
5.4.310.0300.02216.23
5.4.300.0170.03216.23
5.4.290.0150.04216.24
5.4.280.0180.02816.31
5.4.270.0130.02916.24
5.4.260.0040.03916.32
5.4.250.0210.04616.22
5.4.240.0190.03416.29
5.4.230.0150.04116.18
5.4.220.0130.02416.24
5.4.210.0230.03316.18
5.4.200.0180.02716.34
5.4.190.0200.01716.31
5.4.180.0160.03816.26
5.4.170.0160.03916.28
5.4.160.0150.03816.23
5.4.150.0190.02516.34
5.4.140.0250.03714.88
5.4.130.0170.03014.89
5.4.120.0130.02114.95
5.4.110.0170.03915.00
5.4.100.0160.03714.97
5.4.90.0180.02314.91
5.4.80.0130.02714.99
5.4.70.0200.01815.00
5.4.60.0140.02214.91
5.4.50.0190.03414.98
5.4.40.0170.03514.99
5.4.30.0180.03814.93
5.4.20.0180.02214.84
5.4.10.0150.04214.89
5.4.00.0160.03414.70
5.3.290.0160.03013.96
5.3.280.0150.03313.92
5.3.270.0170.02213.96
5.3.260.0160.02514.08
5.3.250.0220.03314.02
5.3.240.0210.03313.93
5.3.230.0130.02313.92
5.3.220.0170.03714.00
5.3.210.0150.02513.90
5.3.200.0190.03713.90
5.3.190.0230.03513.98
5.3.180.0150.03113.91
5.3.170.0130.02913.90
5.3.160.0200.03213.93
5.3.150.0200.03713.90
5.3.140.0150.03013.90
5.3.130.0170.03914.04
5.3.120.0130.03213.99
5.3.110.0170.03213.98
5.3.100.0150.03713.76
5.3.90.0160.02213.66
5.3.80.0220.03513.66
5.3.70.0120.02813.71
5.3.60.0220.02213.69
5.3.50.0120.02813.60
5.3.40.0130.02313.60
5.3.30.0150.02213.73
5.3.20.0120.03613.54
5.3.10.0210.02813.48
5.3.00.0180.02813.45
5.2.170.0270.03712.35
5.2.160.0170.04012.35
5.2.150.0230.04012.35
5.2.140.0270.03712.35
5.2.130.0230.04712.35
5.2.120.0370.04712.35
5.2.110.0230.06012.35
5.2.100.0170.05312.35
5.2.90.0200.04012.35
5.2.80.0270.03712.35
5.2.70.0230.03312.35
5.2.60.0230.03712.35
5.2.50.0370.02712.35
5.2.40.0230.05312.35
5.2.30.0170.04012.35
5.2.20.0230.05712.35
5.2.10.0200.04712.35
5.2.00.0170.04012.35
5.1.60.0230.05012.35
5.1.50.0230.06012.35
5.1.40.0230.03312.35
5.1.30.0200.04312.35
5.1.20.0200.06012.35
5.1.10.0200.02712.35
5.1.00.0270.04012.35
5.0.50.0100.02712.35
5.0.40.0130.03712.35
5.0.30.0070.05312.35
5.0.20.0200.03012.35
5.0.10.0130.03312.35
5.0.00.0130.05312.35
4.4.90.0130.02712.35
4.4.80.0100.03312.35
4.4.70.0200.02012.35
4.4.60.0130.01312.35
4.4.50.0100.03712.35
4.4.40.0130.04312.35
4.4.30.0100.02712.35
4.4.20.0130.03312.35
4.4.10.0130.02312.35
4.4.00.0070.06012.35
4.3.110.0170.01312.35
4.3.100.0130.02312.35
4.3.90.0100.03712.35
4.3.80.0100.04312.35
4.3.70.0170.02712.35
4.3.60.0100.02312.35
4.3.50.0100.03712.35
4.3.40.0070.03312.35
4.3.30.0070.03312.35
4.3.20.0030.03012.35
4.3.10.0070.02012.35
4.3.00.0070.01712.35

preferences:
46.13 ms | 401 KiB | 5 Q