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" yt:seconds="0 in yt namespace" /> </entry> </feed>'; $xml = new SimpleXMLElement($buffer); if (!defined('LIBXML_DOTTED_VERSION')) { echo "PHP/LIBXML unsupported/too old."; return; } echo "ibxml version: ", LIBXML_DOTTED_VERSION, "\n"; $youtube = $xml; echo 'via attributes(): ', $youtube->entry->children('yt', TRUE)->duration->attributes()->seconds, "\n"; echo 'via array-access: ', $youtube->entry->children('yt', TRUE)->duration['seconds'], "\n"; echo 'via property : ', $youtube->entry->children('yt', TRUE)->duration->seconds, "\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.4.10.0040.00418.00
8.3.140.0050.00320.89
8.3.130.0080.00018.85
8.3.120.0100.00618.93
8.3.110.0120.00920.94
8.3.100.0060.00316.88
8.3.90.0110.00416.99
8.3.80.0000.00917.97
8.3.70.0090.00916.75
8.3.60.0120.00318.36
8.3.50.0120.00722.07
8.3.40.0120.00319.14
8.3.30.0090.00619.39
8.3.20.0050.00320.59
8.3.10.0040.00423.91
8.3.00.0030.00519.15
8.2.260.0100.00619.12
8.2.250.0030.00616.98
8.2.240.0060.00318.99
8.2.230.0040.00422.58
8.2.220.0160.00424.06
8.2.210.0120.00326.77
8.2.200.0090.00017.25
8.2.190.0110.00716.75
8.2.180.0040.01117.00
8.2.170.0160.00622.96
8.2.160.0070.00722.41
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00522.46
8.2.110.0100.00022.40
8.2.100.0090.00318.47
8.2.90.0060.00319.13
8.2.80.0000.00817.97
8.2.70.0070.00318.00
8.2.60.0040.00418.18
8.2.50.0040.00418.07
8.2.40.0040.00420.19
8.2.30.0040.00418.54
8.2.20.0050.00317.98
8.2.10.0000.00718.31
8.2.00.0030.00517.90
8.1.310.0150.00416.93
8.1.300.0060.00318.09
8.1.290.0090.00018.88
8.1.280.0120.00425.92
8.1.270.0030.00623.99
8.1.260.0000.00926.35
8.1.250.0080.00028.09
8.1.240.0090.00024.03
8.1.230.0000.01119.34
8.1.220.0080.00017.91
8.1.210.0030.00518.77
8.1.200.0000.00917.48
8.1.190.0050.00317.36
8.1.180.0060.00318.10
8.1.170.0050.00318.39
8.1.160.0000.00722.13
8.1.150.0030.00618.68
8.1.140.0040.00417.55
8.1.130.0000.00817.53
8.1.120.0030.00417.67
8.1.110.0060.00317.49
8.1.100.0000.00717.68
8.1.90.0000.00817.60
8.1.80.0000.00817.54
8.1.70.0000.00717.54
8.1.60.0000.00817.69
8.1.50.0000.00817.53
8.1.40.0000.00817.70
8.1.30.0030.00517.76
8.1.20.0000.00817.88
8.1.10.0050.00317.72
8.1.00.0040.00417.68
8.0.300.0050.00318.77
8.0.290.0050.00317.42
8.0.280.0000.00718.68
8.0.270.0080.00017.39
8.0.260.0000.00617.04
8.0.250.0080.00017.28
8.0.240.0030.00317.30
8.0.230.0000.00817.07
8.0.220.0070.00017.13
8.0.210.0000.00717.15
8.0.200.0000.00817.23
8.0.190.0000.00717.10
8.0.180.0020.00517.02
8.0.170.0060.00317.17
8.0.160.0040.00317.08
8.0.150.0070.00017.07
8.0.140.0070.00017.07
8.0.130.0060.00013.62
8.0.120.0040.00417.12
8.0.110.0000.00717.07
8.0.100.0030.00717.11
8.0.90.0000.00716.93
8.0.80.0070.01117.16
8.0.70.0040.00417.20
8.0.60.0040.00416.90
8.0.50.0000.00817.08
8.0.30.0110.00817.23
8.0.20.0140.00917.33
8.0.10.0180.01517.08
8.0.00.0180.00617.05
7.4.330.0000.00515.35
7.4.320.0030.00316.61
7.4.300.0000.00616.73
7.4.290.0030.00316.81
7.4.280.0000.00816.79
7.4.270.0000.00716.74
7.4.260.0070.00016.71
7.4.250.0000.00816.83
7.4.240.0030.00516.79
7.4.230.0000.00716.54
7.4.220.0130.00716.70
7.4.210.0080.00716.87
7.4.200.0060.00316.54
7.4.190.0040.00416.80
7.4.160.0160.00916.85
7.4.150.0120.01117.05
7.4.140.0180.00917.48
7.4.130.0120.01016.70
7.4.120.0140.00816.80
7.4.110.0120.01616.65
7.4.100.0190.00516.73
7.4.90.0150.01116.61
7.4.80.0140.01018.04
7.4.70.0210.00716.64
7.4.60.0160.00816.69
7.4.50.0160.00416.59
7.4.40.0150.01016.62
7.4.30.0170.00716.54
7.4.20.0170.00716.57
7.4.10.0140.00916.68
7.4.00.0080.00915.87
7.3.330.0050.00013.21
7.3.320.0020.00213.40
7.3.310.0040.00416.34
7.3.300.0070.00016.48
7.3.290.0090.00616.46
7.3.280.0090.00916.50
7.3.270.0180.00816.94
7.3.260.0160.01016.41
7.3.250.0110.00916.65
7.3.240.0160.01216.55
7.3.230.0170.00816.42
7.3.220.0230.00816.45
7.3.210.0210.00616.44
7.3.200.0190.00517.95
7.3.190.0140.01116.55
7.3.180.0130.01216.47
7.3.170.0120.01516.65
7.3.160.0140.01016.70
7.3.150.0180.00616.42
7.3.140.0180.00616.46
7.3.130.0200.00416.62
7.3.120.0130.00715.62
7.3.110.0120.01115.95
7.3.100.0160.00816.10
7.3.90.0120.00816.10
7.3.80.0130.00515.99
7.3.70.0110.01015.96
7.3.60.0100.00916.02
7.3.50.0120.01015.99
7.3.40.0110.00916.01
7.3.30.0100.01116.05
7.3.20.0140.00917.22
7.3.10.0100.01117.18
7.3.00.0110.01117.25
7.2.340.0230.01016.50
7.2.330.0190.01016.45
7.2.320.0120.01216.70
7.2.310.0180.00816.67
7.2.300.0140.01016.70
7.2.290.0150.01116.72
7.2.280.0160.00816.45
7.2.270.0140.01016.63
7.2.260.0120.01216.46
7.2.250.0160.00615.95
7.2.240.0100.01316.21
7.2.230.0150.00516.01
7.2.220.0090.01016.20
7.2.210.0100.01016.08
7.2.200.0130.00816.04
7.2.190.0120.00716.14
7.2.180.0120.01116.15
7.2.170.0120.01116.14
7.2.160.0150.00816.70
7.2.150.0170.00817.70
7.2.140.0170.00817.71
7.2.130.0180.00917.73
7.2.120.0170.00717.65
7.2.110.0120.01217.79
7.2.100.0110.01517.67
7.2.90.0160.00817.68
7.2.80.0120.01217.54
7.2.70.0180.01117.69
7.2.60.0160.00717.41
7.2.50.0160.01017.70
7.2.40.0190.00917.74
7.2.30.0170.00817.71
7.2.20.0130.01117.64
7.2.10.0170.01517.70
7.2.00.0470.00917.69
7.1.330.0130.01116.17
7.1.320.0160.00416.24
7.1.310.0110.00916.35
7.1.300.0100.00716.18
7.1.290.0120.01116.11
7.1.280.0110.01016.21
7.1.270.0120.00816.19
7.1.260.0080.01416.14
7.1.250.0180.00916.54
7.1.240.0140.00916.45
7.1.230.0140.01116.40
7.1.220.0160.01016.35
7.1.210.0130.01216.37
7.1.200.0160.00716.33
7.1.190.0150.01116.47
7.1.180.0140.00916.37
7.1.170.0120.01416.36
7.1.160.0190.00516.65
7.1.150.0170.00616.37
7.1.140.0180.00816.34
7.1.130.0180.00916.47
7.1.120.0190.00516.60
7.1.110.0160.00717.05
7.1.100.0180.00717.19
7.1.90.0110.01217.22
7.1.80.0130.01217.00
7.1.70.0090.01116.79
7.1.60.0170.01021.89
7.1.50.0120.01521.13
7.1.40.0330.01222.49
7.1.30.0320.00822.45
7.1.20.0150.01722.53
7.1.10.0140.00916.49
7.1.00.0100.02518.11
7.0.330.0200.00516.30
7.0.320.0110.01116.21
7.0.310.0240.00616.21
7.0.300.0150.01116.38
7.0.290.0160.00816.21
7.0.280.0170.00716.31
7.0.270.0180.00616.11
7.0.260.0180.00516.21
7.0.250.0110.01216.69
7.0.240.0140.00916.81
7.0.230.0200.00416.82
7.0.220.0120.01016.78
7.0.210.0150.00816.38
7.0.200.0120.00916.46
7.0.190.0130.00916.47
7.0.180.0140.00716.26
7.0.170.0150.00916.31
7.0.160.0140.00816.21
7.0.150.0110.01016.15
7.0.140.0130.02217.72
7.0.130.0080.01316.31
7.0.120.0090.01216.36
7.0.110.0140.01116.38
7.0.100.0110.01617.23
7.0.90.0080.01717.27
7.0.80.0120.01617.22
7.0.70.0170.01717.15
7.0.60.0240.02717.15
7.0.50.0240.02517.28
7.0.40.0070.02917.28
7.0.30.0100.02417.30
7.0.20.0140.02917.30
7.0.10.0160.02317.38
7.0.00.0110.02717.23
5.6.400.0110.01416.04
5.6.390.0140.01316.18
5.6.380.0130.01116.11
5.6.370.0100.01416.13
5.6.360.0130.01116.06
5.6.350.0140.00816.19
5.6.340.0130.01315.98
5.6.330.0140.01315.97
5.6.320.0150.01016.05
5.6.310.0160.01016.08
5.6.300.0160.02417.54
5.6.290.0160.02317.56
5.6.280.0140.03418.57
5.6.270.0170.02917.72
5.6.260.0160.02717.62
5.6.250.0120.02918.39
5.6.240.0050.03418.51
5.6.230.0090.03618.47
5.6.220.0120.04318.43
5.6.210.0150.03418.47
5.6.200.0150.04418.61
5.6.190.0120.03018.54
5.6.180.0130.04518.47
5.6.170.0130.03218.54
5.6.160.0130.04218.60
5.6.150.0140.03818.62
5.6.140.0130.04018.53
5.6.130.0120.04118.57
5.6.120.0150.03118.46
5.6.110.0130.03918.51
5.6.100.0120.04118.47
5.6.90.0150.04018.40
5.6.80.0110.04318.22
5.6.70.0160.03918.25
5.6.60.0130.03918.23
5.6.50.0100.04418.21
5.6.40.0120.03918.19
5.6.30.0150.03218.17
5.6.20.0090.04018.29
5.6.10.0110.03318.13
5.6.00.0100.03418.15
5.5.380.0140.02617.52
5.5.370.0110.03017.60
5.5.360.0110.03417.40
5.5.350.0150.03817.44
5.5.340.0170.03017.69
5.5.330.0150.03517.72
5.5.320.0150.04217.69
5.5.310.0120.03917.69
5.5.300.0120.03717.59
5.5.290.0110.04617.75
5.5.280.0160.03217.66
5.5.270.0110.03517.66
5.5.260.0130.04017.70
5.5.250.0090.04317.61
5.5.240.0140.03517.54
5.5.230.0110.03317.51
5.5.220.0100.03017.42
5.5.210.0150.03517.45
5.5.200.0090.03717.41
5.5.190.0100.03817.42
5.5.180.0140.03617.35
5.5.170.0150.00715.88
5.5.160.0130.03517.24
5.5.150.0090.04117.43
5.5.140.0140.03117.40
5.5.130.0130.03717.43
5.5.120.0120.03817.32
5.5.110.0120.03017.38
5.5.100.0140.02817.29
5.5.90.0120.03417.36
5.5.80.0110.03617.29
5.5.70.0110.03817.35
5.5.60.0100.02817.35
5.5.50.0100.03217.32
5.5.40.0120.03517.37
5.5.30.0140.03517.43
5.5.20.0110.03717.29
5.5.10.0050.04817.26
5.5.00.0080.04017.24
5.4.450.0110.03116.63
5.4.440.0100.03916.56
5.4.430.0100.03916.74
5.4.420.0130.03516.59
5.4.410.0140.04016.47
5.4.400.0110.03216.53
5.4.390.0130.03716.35
5.4.380.0120.02816.42
5.4.370.0110.03216.45
5.4.360.0130.03116.46
5.4.350.0090.03916.44
5.4.340.0140.03216.42
5.4.330.0080.00913.75
5.4.320.0120.03116.54
5.4.310.0100.03816.36
5.4.300.0100.04116.44
5.4.290.0060.03616.42
5.4.280.0100.03216.39
5.4.270.0110.03016.46
5.4.260.0110.03316.36
5.4.250.0040.04016.49
5.4.240.0110.03216.39
5.4.230.0080.02716.40
5.4.220.0080.03316.42
5.4.210.0120.03416.40
5.4.200.0060.03516.46
5.4.190.0100.02516.36
5.4.180.0080.03616.28
5.4.170.0070.03716.45
5.4.160.0080.03716.45
5.4.150.0050.03316.36
5.4.140.0090.03515.10
5.4.130.0110.03815.16
5.4.120.0090.03515.17
5.4.110.0100.02515.19
5.4.100.0100.03115.16
5.4.90.0090.03415.12
5.4.80.0090.03615.10
5.4.70.0090.03315.20
5.4.60.0080.02615.16
5.4.50.0110.03315.15
5.4.40.0120.02615.14
5.4.30.0140.02015.14
5.4.20.0070.03615.09
5.4.10.0100.02715.10
5.4.00.0060.03014.85
5.3.290.0090.03914.48
5.3.280.0140.03214.38
5.3.270.0080.03114.44
5.3.260.0050.03814.42
5.3.250.0080.03114.43
5.3.240.0090.03614.39
5.3.230.0090.03714.40
5.3.220.0070.03914.43
5.3.210.0090.03714.38
5.3.200.0110.03314.40
5.3.190.0070.04114.43
5.3.180.0090.02814.44
5.3.170.0080.03614.43
5.3.160.0080.02914.48
5.3.150.0090.03614.48
5.3.140.0110.02914.41
5.3.130.0100.03314.42
5.3.120.0120.02814.45
5.3.110.0100.03314.38
5.3.100.0090.02814.20
5.3.90.0050.03714.30
5.3.80.0110.03414.23
5.3.70.0080.03614.27
5.3.60.0110.03614.28
5.3.50.0100.03714.25
5.3.40.0070.03814.28
5.3.30.0120.02314.29
5.3.20.0070.03314.19
5.3.10.0130.03114.09
5.3.00.0110.03114.12

preferences:
29.75 ms | 403 KiB | 5 Q