3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * How to get attribute of node with namespace using SimpleXML? * * @link http://stackoverflow.com/q/6576773/367456 */ $buffer = '<feed xmlns="http://www.w3.org/2005/Atom" xmlns:yt="http://gdata.youtube.com/schemas/2007"> <entry> <yt:duration seconds="1870"/> </entry> </feed>'; $xml = new SimpleXMLElement($buffer); foreach ($xml->entry as $item) { //original comment: how to get seconds? $namespaces = $item->getNameSpaces(true); $yt = $item->children($namespaces['yt']); $seconds = $yt->duration->attributes(); echo $seconds['seconds']; // original comment: but doesn't work. }

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.0110.00416.63
8.3.50.0100.00922.11
8.3.40.0110.00719.00
8.3.30.0090.00619.29
8.3.20.0050.00320.59
8.3.10.0040.00423.96
8.3.00.0060.00319.50
8.2.180.0040.01118.66
8.2.170.0070.00722.96
8.2.160.0130.00020.59
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00722.56
8.2.110.0030.00722.42
8.2.100.0040.00718.03
8.2.90.0080.00019.61
8.2.80.0050.00318.18
8.2.70.0050.00317.75
8.2.60.0030.00618.18
8.2.50.0000.00818.07
8.2.40.0080.00018.59
8.2.30.0040.00418.39
8.2.20.0030.00617.88
8.2.10.0030.00618.23
8.2.00.0040.00417.94
8.1.280.0030.01025.92
8.1.270.0040.00422.31
8.1.260.0110.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00324.04
8.1.230.0080.00419.26
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0000.00917.25
8.1.190.0080.00017.65
8.1.180.0030.00618.10
8.1.170.0030.00518.84
8.1.160.0000.00822.27
8.1.150.0000.00718.74
8.1.140.0050.00217.54
8.1.130.0000.00718.12
8.1.120.0070.00017.75
8.1.110.0040.00417.61
8.1.100.0000.00817.55
8.1.90.0030.00517.64
8.1.80.0000.00717.70
8.1.70.0040.00417.56
8.1.60.0080.00017.70
8.1.50.0000.00817.73
8.1.40.0030.00517.82
8.1.30.0080.00017.82
8.1.20.0040.00417.76
8.1.10.0030.00617.73
8.1.00.0000.00817.79
8.0.300.0000.00718.77
8.0.290.0040.00417.29
8.0.280.0040.00418.65
8.0.270.0030.00317.41
8.0.260.0030.00318.62
8.0.250.0030.00317.19
8.0.240.0000.00717.15
8.0.230.0080.00017.05
8.0.220.0070.00017.15
8.0.210.0000.00717.14
8.0.200.0070.00017.20
8.0.190.0040.00417.17
8.0.180.0060.00317.16
8.0.170.0050.00317.02
8.0.160.0030.00417.13
8.0.150.0070.00017.05
8.0.140.0000.00717.10
8.0.130.0030.00313.49
8.0.120.0030.00516.95
8.0.110.0020.00516.99
8.0.100.0050.00217.14
8.0.90.0040.00416.92
8.0.80.0060.00917.00
8.0.70.0000.00717.13
8.0.60.0070.00017.16
8.0.50.0040.00417.03
8.0.30.0140.00817.18
8.0.20.0080.01517.41
8.0.10.0040.00417.29
8.0.00.0130.00716.87
7.4.330.0000.00515.29
7.4.320.0070.00016.68
7.4.300.0030.00316.66
7.4.290.0030.00816.75
7.4.280.0030.00316.60
7.4.270.0000.00716.82
7.4.260.0000.00716.68
7.4.250.0070.00016.79
7.4.240.0060.00116.78
7.4.230.0070.00016.76
7.4.220.0050.01416.90
7.4.210.0040.01016.80
7.4.200.0030.00316.78
7.4.190.0050.00216.88
7.4.160.0160.00716.65
7.4.150.0110.00717.40
7.4.140.0080.00817.86
7.4.130.0080.00816.85
7.4.120.0130.00316.72
7.4.110.0120.00816.63
7.4.100.0110.00816.64
7.4.90.0130.00316.68
7.4.80.0040.01519.39
7.4.70.0110.00816.64
7.4.60.0080.00816.75
7.4.50.0030.00616.75
7.4.40.0130.00322.77
7.4.30.0160.00016.59
7.4.10.0040.01115.29
7.4.00.0090.00915.25
7.3.330.0000.00513.19
7.3.320.0000.00613.13
7.3.310.0000.00716.39
7.3.300.0030.00316.48
7.3.290.0090.00616.43
7.3.280.0080.01116.46
7.3.270.0180.00617.40
7.3.260.0070.01016.40
7.3.250.0110.00816.74
7.3.240.0040.01216.68
7.3.230.0080.00816.63
7.3.210.0000.01616.36
7.3.200.0140.00419.39
7.3.190.0080.01516.68
7.3.180.0040.01116.73
7.3.170.0060.01516.75
7.3.160.0040.01516.59
7.3.130.0080.00414.75
7.3.120.0020.01515.01
7.3.110.0090.00614.90
7.3.100.0060.01115.08
7.3.90.0050.00914.71
7.3.80.0070.00714.90
7.3.70.0070.00714.92
7.3.60.0090.00314.90
7.3.50.0050.01014.77
7.3.40.0020.01314.63
7.3.30.0040.00814.72
7.3.20.0100.00516.56
7.3.10.0100.00416.64
7.3.00.0050.01016.56
7.2.330.0090.00916.74
7.2.320.0090.00917.01
7.2.310.0090.00616.94
7.2.300.0100.00716.95
7.2.290.0090.00916.89
7.2.260.0070.01115.14
7.2.250.0070.01015.40
7.2.240.0030.01115.01
7.2.230.0110.00515.21
7.2.220.0050.01115.29
7.2.210.0040.00915.27
7.2.200.0040.01114.95
7.2.190.0060.00815.15
7.2.180.0070.00514.99
7.2.170.0080.00715.09
7.2.160.0070.00915.17
7.2.150.0060.01117.19
7.2.140.0060.01017.08
7.2.130.0100.00617.02
7.2.120.0060.00716.92
7.2.110.0070.00717.11
7.2.100.0050.00817.03
7.2.90.0040.01017.11
7.2.80.0050.01017.08
7.2.70.0100.00517.01
7.2.60.0050.01017.09
7.2.50.0030.01217.08
7.2.40.0070.00717.13
7.2.30.0040.00816.97
7.2.20.0040.01017.13
7.2.10.0060.00916.91
7.2.00.0040.01016.92
7.1.330.0060.00815.84
7.1.320.0060.00715.88
7.1.310.0110.00315.95
7.1.300.0030.01215.77
7.1.290.0030.01215.79
7.1.280.0020.01215.72
7.1.270.0070.00515.57
7.1.260.0030.00715.84
7.1.250.0060.00715.75
7.1.240.0070.00715.83
7.1.230.0070.00315.94
7.1.220.0060.00615.95
7.1.210.0080.00815.59
7.1.200.0000.01215.94
7.1.190.0070.00715.55
7.1.180.0060.00915.88
7.1.170.0030.00615.95
7.1.160.0030.01015.75
7.1.150.0030.00615.73
7.1.140.0040.01115.99
7.1.130.0070.00715.98
7.1.120.0060.00616.15
7.1.110.0000.00816.00
7.1.100.0060.00315.74
7.1.90.0120.00015.96
7.1.80.0100.00315.77
7.1.70.0080.00616.46
7.1.60.0090.01017.55
7.1.50.0070.01116.39
7.1.40.0060.00315.47
7.1.30.0030.00715.86
7.1.20.0040.00715.77
7.1.10.0030.00915.75
7.1.00.0060.04219.22
7.0.330.0070.01015.56
7.0.320.0000.01515.52
7.0.310.0070.01015.58
7.0.300.0080.00315.54
7.0.290.0040.01115.50
7.0.280.0040.00815.60
7.0.270.0060.00315.34
7.0.260.0030.01215.50
7.0.250.0060.00615.31
7.0.240.0040.00815.64
7.0.230.0060.00915.53
7.0.220.0030.00715.61
7.0.210.0000.01115.49
7.0.200.0030.00816.28
7.0.190.0000.00915.47
7.0.180.0070.00315.47
7.0.170.0030.01015.62
7.0.160.0090.00615.55
7.0.150.0040.00715.45
7.0.140.0040.03818.79
7.0.130.0040.01115.32
7.0.120.0100.00315.60
7.0.110.0030.00615.33
7.0.100.0040.00415.44
7.0.90.0070.01015.43
7.0.80.0100.02817.72
7.0.70.0280.03817.84
7.0.60.0180.02617.83
7.0.50.0170.02218.02
7.0.40.0030.02616.78
7.0.30.0070.04216.78
7.0.20.0040.02816.86
7.0.10.0080.03716.95
7.0.00.0020.04316.90
5.6.400.0140.00414.04
5.6.390.0030.01414.46
5.6.380.0040.00814.58
5.6.370.0070.00714.69
5.6.360.0090.00414.50
5.6.350.0080.00814.27
5.6.340.0070.00714.32
5.6.330.0040.00714.68
5.6.320.0060.00614.66
5.6.310.0030.00614.73
5.6.300.0110.00314.53
5.6.290.0100.00714.52
5.6.280.0050.04117.84
5.6.270.0060.00614.58
5.6.260.0090.00014.66
5.6.250.0070.00714.79
5.6.240.0060.00314.53
5.6.230.0050.03817.68
5.6.220.0070.02717.53
5.6.210.0050.02617.57
5.6.200.0050.03017.82
5.6.190.0100.03017.78
5.6.180.0110.03617.91
5.6.170.0050.02317.76
5.6.160.0080.03617.67
5.6.150.0030.03217.63
5.6.140.0070.02417.70
5.6.130.0070.02317.65
5.6.120.0090.02017.77
5.6.110.0070.02317.72
5.6.100.0020.02317.98
5.6.90.0030.02917.79
5.6.80.0150.01317.46
5.6.70.0040.02317.47
5.6.60.0050.02417.57
5.6.50.0050.02417.50
5.6.40.0090.02517.69
5.6.30.0090.02117.51
5.6.20.0070.02417.43
5.6.10.0020.02717.55
5.6.00.0060.02217.42
5.5.380.0100.00714.09
5.5.370.0030.04317.54
5.5.360.0020.02617.47
5.5.350.0000.02717.49
5.5.340.0030.02717.79
5.5.330.0070.03017.76
5.5.320.0050.02317.82
5.5.310.0060.02817.76
5.5.300.0050.02317.75
5.5.290.0040.03217.81
5.5.280.0030.02917.62
5.5.270.0020.03017.58
5.5.260.0080.03017.60
5.5.250.0030.03817.57
5.5.240.0040.02817.26
5.5.230.0090.02017.27
5.5.220.0090.03217.21
5.5.210.0080.02217.27
5.5.200.0060.02517.33
5.5.190.0030.03217.15
5.5.180.0030.02517.03
5.5.170.0120.00314.21
5.5.160.0070.01717.43
5.5.150.0040.02917.41
5.5.140.0000.04717.31
5.5.130.0050.04217.31
5.5.120.0060.04317.35
5.5.110.0010.02817.42
5.5.100.0050.04217.30
5.5.90.0040.02917.25
5.5.80.0090.03917.08
5.5.70.0120.03817.29
5.5.60.0050.03517.36
5.5.50.0050.03317.06
5.5.40.0080.03317.28
5.5.30.0060.04417.24
5.5.20.0010.02917.17
5.5.10.0070.03217.14
5.5.00.0050.03317.15
5.4.450.0060.03016.12
5.4.440.0040.04016.12
5.4.430.0050.02316.12
5.4.420.0030.03716.10
5.4.410.0040.02216.05
5.4.400.0070.02015.94
5.4.390.0060.03015.95
5.4.380.0020.02215.94
5.4.370.0090.01915.96
5.4.360.0050.02515.94
5.4.350.0050.03215.95
5.4.340.0080.01815.80
5.4.330.0030.00312.72
5.4.320.0020.02815.93
5.4.310.0050.03716.04
5.4.300.0020.03915.95
5.4.290.0050.02615.91
5.4.280.0030.02715.80
5.4.270.0050.02315.80
5.4.260.0070.03015.79
5.4.250.0080.03815.96
5.4.240.0070.03915.95
5.4.230.0080.04015.81
5.4.220.0030.03316.02
5.4.210.0100.03315.78
5.4.200.0030.02716.04
5.4.190.0050.03215.95
5.4.180.0020.04215.78
5.4.170.0070.04315.95
5.4.160.0070.04215.94
5.4.150.0030.04015.90
5.4.140.0080.03814.59
5.4.130.0100.02714.63
5.4.120.0060.03114.48
5.4.110.0030.04314.53
5.4.100.0080.03414.53
5.4.90.0090.03514.59
5.4.80.0060.02814.60
5.4.70.0050.04214.62
5.4.60.0050.03014.51
5.4.50.0100.03314.57
5.4.40.0060.02714.63
5.4.30.0050.04014.51
5.4.20.0050.02214.56
5.4.10.0030.02914.56
5.4.00.0070.03614.36
5.3.290.0050.04413.71
5.3.280.0020.04513.61
5.3.270.0120.03713.73
5.3.260.0120.03013.74
5.3.250.0040.04113.62
5.3.240.0050.04113.74
5.3.230.0030.03813.71
5.3.220.0070.03513.70
5.3.210.0020.03113.59
5.3.200.0080.02513.59
5.3.190.0100.03813.72
5.3.180.0030.04213.66
5.3.170.0080.02713.71
5.3.160.0060.04013.60
5.3.150.0060.04113.61
5.3.140.0050.04113.66
5.3.130.0070.02713.60
5.3.120.0050.02013.58
5.3.110.0040.03913.65
5.3.100.0030.03713.45
5.3.90.0070.03813.43
5.3.80.0090.01813.40
5.3.70.0040.03613.29
5.3.60.0020.03113.39
5.3.50.0060.01613.37
5.3.40.0080.03613.25
5.3.30.0020.03813.31
5.3.20.0040.03413.26
5.3.10.0080.01613.23
5.3.00.0000.02413.24
5.2.170.0030.04012.19
5.2.160.0030.06012.19
5.2.150.0030.05712.19
5.2.140.0100.02312.19
5.2.130.0030.03012.19
5.2.120.0000.03012.19
5.2.110.0030.03012.19
5.2.100.0000.03312.19
5.2.90.0000.05312.19
5.2.80.0070.05012.19
5.2.70.0030.04312.19
5.2.60.0000.04312.19
5.2.50.0030.04312.19
5.2.40.0030.04712.19
5.2.30.0100.05012.19
5.2.20.0070.05312.19
5.2.10.0070.05312.19
5.2.00.0070.04712.19
5.1.60.0000.05712.19
5.1.50.0070.03312.19
5.1.40.0100.04012.19
5.1.30.0130.04712.19
5.1.20.0100.05312.19
5.1.10.0000.04312.19
5.1.00.0030.06012.19
5.0.50.0030.03012.19
5.0.40.0100.03312.19
5.0.30.0000.06312.19
5.0.20.0030.03312.19
5.0.10.0030.03012.19
5.0.00.0030.05012.19
4.4.90.0030.03712.19
4.4.80.0000.02012.19
4.4.70.0030.02712.19
4.4.60.0030.03312.19
4.4.50.0000.03312.19
4.4.40.0030.04012.19
4.4.30.0030.03712.19
4.4.20.0030.03312.19
4.4.10.0030.03312.19
4.4.00.0100.02712.19
4.3.110.0000.02312.19
4.3.100.0000.02312.19
4.3.90.0000.03312.19
4.3.80.0030.03312.19
4.3.70.0000.03312.19
4.3.60.0070.02312.19
4.3.50.0000.03312.19
4.3.40.0030.05012.19
4.3.30.0030.03312.19
4.3.20.0000.03312.19
4.3.10.0030.01712.19
4.3.00.0000.01312.19

preferences:
57.42 ms | 401 KiB | 5 Q