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); echo "ibxml version: ", LIBXML_DOTTED_VERSION, "\n"; foreach ($xml->entry as $item) { //original comment: how to get seconds? $namespaces = $item->getNameSpaces(true); var_dump($namespaces); $yt = $item->children($namespaces['yt']); $seconds = $yt->duration->attributes(); echo $seconds['seconds'], "\n"; // original comment: but doesn't work. } echo "done. should read 1870 one time.\n";

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.0070.01118.81
8.3.50.0150.00722.03
8.3.40.0140.00319.09
8.3.30.0110.00420.43
8.3.20.0000.00819.07
8.3.10.0080.00021.34
8.3.00.0050.00319.81
8.2.180.0180.00416.88
8.2.170.0070.00722.96
8.2.160.0070.00720.64
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0040.00421.09
8.2.110.0090.00022.45
8.2.100.0040.00818.16
8.2.90.0080.00019.42
8.2.80.0040.00419.53
8.2.70.0060.00317.63
8.2.60.0060.00318.18
8.2.50.0080.00018.07
8.2.40.0040.00418.32
8.2.30.0040.00419.70
8.2.20.0000.00817.94
8.2.10.0040.00417.98
8.2.00.0000.00817.96
8.1.280.0170.00025.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.84
8.1.230.0040.00721.18
8.1.220.0040.00418.77
8.1.210.0000.00818.95
8.1.200.0060.00317.61
8.1.190.0060.00317.66
8.1.180.0000.00818.10
8.1.170.0080.00018.91
8.1.160.0040.00419.00
8.1.150.0050.00318.75
8.1.140.0050.00217.68
8.1.130.0030.00318.10
8.1.120.0050.00317.54
8.1.110.0060.00317.60
8.1.100.0000.00817.72
8.1.90.0000.00817.77
8.1.80.0040.00417.74
8.1.70.0000.00717.58
8.1.60.0060.00317.84
8.1.50.0040.00417.74
8.1.40.0040.00417.72
8.1.30.0050.00317.73
8.1.20.0000.00917.75
8.1.10.0000.00717.70
8.1.00.0090.00317.66
8.0.300.0070.00020.15
8.0.290.0070.00017.29
8.0.280.0040.00418.55
8.0.270.0030.00317.42
8.0.260.0000.00716.92
8.0.250.0050.00217.07
8.0.240.0050.00317.21
8.0.230.0050.00217.14
8.0.220.0040.00417.00
8.0.210.0040.00417.07
8.0.200.0000.00617.19
8.0.190.0000.00717.19
8.0.180.0050.00217.19
8.0.170.0000.00816.94
8.0.160.0030.00616.98
8.0.150.0000.00716.99
8.0.140.0000.00716.96
8.0.130.0050.00013.60
8.0.120.0080.00017.09
8.0.110.0000.00717.16
8.0.100.0000.01017.04
8.0.90.0040.00416.96
8.0.80.0080.00817.16
8.0.70.0000.00816.93
8.0.60.0070.00017.01
8.0.50.0000.00816.90
8.0.30.0060.01317.21
8.0.20.0080.01117.42
8.0.10.0040.00417.29
8.0.00.0070.01317.05
7.4.330.0000.00616.96
7.4.320.0060.00016.88
7.4.300.0000.00716.77
7.4.290.0070.00016.73
7.4.280.0070.00016.74
7.4.270.0020.00516.78
7.4.260.0000.00613.41
7.4.250.0060.00316.78
7.4.240.0040.00416.78
7.4.230.0070.00016.84
7.4.220.0060.00916.78
7.4.210.0100.00616.81
7.4.200.0030.00316.72
7.4.190.0040.00416.98
7.4.160.0150.00316.63
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0090.01116.79
7.4.120.0120.00516.84
7.4.110.0120.00616.71
7.4.100.0180.00316.71
7.4.90.0150.00316.53
7.4.80.0090.01419.39
7.4.70.0060.01516.77
7.4.60.0180.00416.82
7.4.50.0040.00416.82
7.4.40.0030.00622.77
7.4.30.0130.00316.57
7.4.00.0050.01215.04
7.3.330.0000.00513.40
7.3.320.0030.00313.42
7.3.310.0000.00616.54
7.3.300.0000.00716.36
7.3.290.0120.00316.48
7.3.280.0130.00516.48
7.3.270.0140.01017.40
7.3.260.0110.00818.24
7.3.250.0040.01316.59
7.3.240.0140.00616.45
7.3.230.0120.01216.50
7.3.210.0140.00316.63
7.3.200.0060.01719.39
7.3.190.0100.00716.60
7.3.180.0060.00916.57
7.3.170.0090.00616.73
7.3.160.0150.00016.53
7.3.120.0070.01014.95
7.3.110.0000.01914.80
7.3.100.0130.00615.05
7.3.90.0040.01415.12
7.3.80.0030.01315.05
7.3.70.0130.00014.96
7.3.60.0070.00715.12
7.3.50.0030.00914.78
7.3.40.0060.00614.67
7.3.30.0100.00315.03
7.3.20.0060.00316.81
7.3.10.0060.00316.72
7.3.00.0100.00316.65
7.2.330.0090.00816.91
7.2.320.0110.00716.70
7.2.310.0130.01016.92
7.2.300.0120.00616.73
7.2.290.0160.00916.73
7.2.250.0150.00615.48
7.2.240.0100.01015.29
7.2.230.0070.00715.33
7.2.220.0030.01315.21
7.2.210.0090.00314.93
7.2.200.0000.01714.93
7.2.190.0080.00815.13
7.2.180.0000.01215.27
7.2.170.0000.01715.09
7.2.160.0000.01614.88
7.2.150.0030.01017.32
7.2.140.0030.00917.02
7.2.130.0070.00717.14
7.2.120.0000.01617.13
7.2.110.0030.00617.13
7.2.100.0060.00917.16
7.2.90.0070.00716.80
7.2.80.0030.01217.16
7.2.70.0090.00617.16
7.2.60.0060.00617.09
7.2.50.0120.00317.01
7.2.40.0090.00316.94
7.2.30.0000.01417.07
7.2.20.0000.01116.87
7.2.10.0000.01017.14
7.2.00.0050.00718.18
7.1.330.0060.01315.89
7.1.320.0070.00715.79
7.1.310.0040.00715.84
7.1.300.0000.01315.70
7.1.290.0000.00815.99
7.1.280.0040.01115.61
7.1.270.0000.00916.06
7.1.260.0000.00915.66
7.1.250.0030.01015.69
7.1.240.0120.00315.67
7.1.230.0070.00715.86
7.1.220.0080.00415.68
7.1.210.0070.00315.95
7.1.200.0050.00815.78
7.1.190.0070.00715.79
7.1.180.0030.00915.78
7.1.170.0070.01015.69
7.1.160.0000.00915.86
7.1.150.0090.00315.95
7.1.140.0040.01115.63
7.1.130.0000.01116.00
7.1.120.0090.00315.80
7.1.110.0000.01416.11
7.1.100.0040.00815.99
7.1.90.0140.00316.03
7.1.80.0080.00315.70
7.1.70.0060.00416.60
7.1.60.0110.00316.66
7.1.50.0080.00816.32
7.1.40.0090.00416.03
7.1.30.0100.00315.75
7.1.20.0030.00915.86
7.1.10.0100.00615.98
7.1.00.0050.02019.22
7.0.330.0070.00715.40
7.0.320.0030.01015.46
7.0.310.0030.01315.20
7.0.300.0000.01015.52
7.0.290.0000.01315.58
7.0.280.0000.01215.42
7.0.270.0030.00915.60
7.0.260.0090.00315.57
7.0.250.0090.00315.40
7.0.240.0100.00715.39
7.0.230.0040.01115.53
7.0.220.0080.00415.49
7.0.210.0060.00315.61
7.0.200.0080.00516.22
7.0.190.0100.00615.57
7.0.180.0060.00315.36
7.0.170.0060.00615.68
7.0.160.0080.00315.50
7.0.150.0090.00615.55
7.0.140.0090.03718.80
7.0.130.0030.00715.22
7.0.120.0040.01115.42
7.0.110.0060.00915.59
7.0.100.0050.02417.83
7.0.90.0070.02717.76
7.0.80.0050.03717.89
7.0.70.0050.04117.73
7.0.60.0050.04017.63
7.0.50.0050.04417.97
7.0.40.0100.03816.96
7.0.30.0100.04316.87
7.0.20.0140.04016.83
7.0.10.0080.04616.82
7.0.00.0070.04516.72
5.6.400.0030.01314.45
5.6.390.0030.01014.58
5.6.380.0000.01514.57
5.6.370.0040.01114.80
5.6.360.0080.00814.04
5.6.350.0000.01314.85
5.6.340.0040.01414.26
5.6.330.0040.00414.67
5.6.320.0040.01214.91
5.6.310.0110.00414.47
5.6.300.0080.00614.59
5.6.290.0110.00414.52
5.6.280.0060.03917.85
5.6.270.0030.01214.81
5.6.260.0030.00714.60
5.6.250.0040.02517.54
5.6.240.0000.03817.43
5.6.230.0050.03717.59
5.6.220.0030.04517.42
5.6.210.0080.02417.70
5.6.200.0040.04917.81
5.6.190.0050.04717.97
5.6.180.0070.04017.84
5.6.170.0090.04517.85
5.6.160.0060.04517.81
5.6.150.0110.04117.78
5.6.140.0050.04617.75
5.6.130.0050.04817.87
5.6.120.0070.04717.68
5.6.110.0080.04517.96
5.6.100.0080.03017.71
5.6.90.0080.04617.88
5.6.80.0080.03517.45
5.6.70.0080.04017.37
5.6.60.0050.04717.63
5.6.50.0130.03717.44
5.6.40.0030.04917.45
5.6.30.0030.04017.49
5.6.20.0080.04117.32
5.6.10.0070.04217.39
5.6.00.0070.03917.26
5.5.380.0070.02317.50
5.5.370.0070.04017.45
5.5.360.0100.04317.43
5.5.350.0030.04717.19
5.5.340.0020.04717.45
5.5.330.0030.04917.71
5.5.320.0100.04317.67
5.5.310.0080.04517.58
5.5.300.0050.04317.64
5.5.290.0070.04617.44
5.5.280.0130.04317.79
5.5.270.0050.04317.53
5.5.260.0100.04417.76
5.5.250.0160.04217.61
5.5.240.0080.04017.36
5.5.230.0060.03017.43
5.5.220.0070.03717.30
5.5.210.0100.04017.32
5.5.200.0040.04517.36
5.5.190.0030.04517.19
5.5.180.0070.03117.18
5.5.170.0030.00614.50
5.5.160.0130.03817.22
5.5.150.0050.04417.35
5.5.140.0070.04217.32
5.5.130.0120.03717.27
5.5.120.0100.03517.34
5.5.110.0080.03817.34
5.5.100.0070.04017.30
5.5.90.0070.04317.29
5.5.80.0060.03817.38
5.5.70.0080.04017.28
5.5.60.0080.03317.15
5.5.50.0070.04417.32
5.5.40.0120.03817.13
5.5.30.0050.04217.16
5.5.20.0100.04017.18
5.5.10.0050.04517.23
5.5.00.0050.04417.17
5.4.450.0070.03515.16
5.4.440.0070.04215.36
5.4.430.0120.03515.34
5.4.420.0050.04315.33
5.4.410.0090.03515.14
5.4.400.0030.04315.04
5.4.390.0030.04715.04
5.4.380.0030.04415.09
5.4.370.0050.04115.20
5.4.360.0100.03714.91
5.4.350.0050.04315.16
5.4.340.0070.02615.21
5.4.330.0030.00311.09
5.4.320.0030.04314.99
5.4.310.0030.04315.15
5.4.300.0060.03915.01
5.4.290.0050.04015.11
5.4.280.0100.04115.06
5.4.270.0050.04015.09
5.4.260.0070.04314.96
5.4.250.0020.04215.05
5.4.240.0050.04015.13
5.4.230.0040.04315.18
5.4.220.0080.04015.04
5.4.210.0080.02515.04
5.4.200.0080.04115.14
5.4.190.0080.03815.03
5.4.180.0060.02715.06
5.4.170.0030.04415.18
5.4.160.0080.02515.21
5.4.150.0100.04014.93
5.4.140.0050.02613.64
5.4.130.0080.02713.88
5.4.120.0070.03713.68
5.4.110.0070.03713.78
5.4.100.0090.03913.84
5.4.90.0030.04313.85
5.4.80.0100.03613.64
5.4.70.0050.04013.75
5.4.60.0080.03513.79
5.4.50.0030.03013.75
5.4.40.0070.03913.86
5.4.30.0020.04013.83
5.4.20.0080.03813.76
5.4.10.0070.03013.83
5.4.00.0080.03713.45
5.3.290.0030.04112.58
5.3.280.0000.04812.50
5.3.270.0070.03912.63
5.3.260.0080.03812.63
5.3.250.0000.04512.71
5.3.240.0050.02712.49
5.3.230.0050.03712.60
5.3.220.0070.02212.51
5.3.210.0050.04212.58
5.3.200.0070.04112.49
5.3.190.0080.03812.66
5.3.180.0050.04012.69
5.3.170.0050.03712.73
5.3.160.0050.04212.65
5.3.150.0070.03712.67
5.3.140.0120.03312.54
5.3.130.0090.03812.66
5.3.120.0070.03712.66
5.3.110.0050.02212.58
5.3.100.0030.04612.26
5.3.90.0020.04212.37
5.3.80.0030.04012.09
5.3.70.0070.03912.33
5.3.60.0020.04312.23
5.3.50.0100.03512.34
5.3.40.0040.04412.15
5.3.30.0040.03612.14
5.3.20.0030.03912.16
5.3.10.0080.03612.02
5.3.00.0060.04012.05
5.2.170.0100.06011.33
5.2.160.0100.04311.14
5.2.150.0070.06011.32
5.2.140.0030.04011.22
5.2.130.0030.06311.03
5.2.120.0100.06011.20
5.2.110.0070.03011.31
5.2.100.0030.06311.16
5.2.90.0030.06311.25
5.2.80.0030.06311.19
5.2.70.0070.06311.02
5.2.60.0070.05011.14
5.2.50.0100.05711.20
5.2.40.0030.06011.09
5.2.30.0100.05711.03
5.2.20.0030.06310.98
5.2.10.0100.05310.85
5.2.00.0030.05310.93
5.1.60.0100.05010.07
5.1.50.0100.04310.15
5.1.40.0100.04310.11
5.1.30.0130.05010.45
5.1.20.0030.04010.35
5.1.10.0070.05010.24
5.1.00.0100.05010.19
5.0.50.0130.0378.62
5.0.40.0100.0308.39
5.0.30.0000.0708.36
5.0.20.0030.0438.43
5.0.10.0030.0338.32
5.0.00.0030.0638.28
4.4.90.0030.0378.16
4.4.80.0030.0378.16
4.4.70.0000.0378.16
4.4.60.0030.0278.16
4.4.50.0000.0378.16
4.4.40.0000.0578.16
4.4.30.0000.0378.16
4.4.20.0000.0378.16
4.4.10.0070.0308.16
4.4.00.0030.0538.16
4.3.110.0070.0338.16
4.3.100.0000.0378.16
4.3.90.0030.0338.16
4.3.80.0000.0538.16
4.3.70.0130.0238.16
4.3.60.0000.0378.16
4.3.50.0000.0378.16
4.3.40.0030.0478.16
4.3.30.0030.0238.16
4.3.20.0000.0378.16
4.3.10.0000.0378.16
4.3.00.0000.0338.16

preferences:
47.91 ms | 401 KiB | 5 Q