3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'. '<request><body test2="321" test3="987">'. '<rows><my-row test4="564">'. '<types>'. '<custom>this is the example of the text</custom>'. '<Generic arch="simple">this is the example of the text</Generic>'. '<bold/><italic/><underlined/>'. '</types>'. '</my-row><my-row test5="565"/><test hidden="false" ready="true"/></rows>'. '</body></request>'; function f($xml, $stack = null){ $s = is_null($stack) ? array() : $stack; foreach ($xml as $key => $value) { print_r(array( $key, $value->hasChildren(), $value->attributes(), '=============' )); if (get_class($value) == 'SimpleXMLIterator') f($value, $s); } } f(new SimpleXMLIterator($s));

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.0100.01018.26
8.3.50.0110.00422.11
8.3.40.0080.00818.86
8.3.30.0140.00019.29
8.3.20.0120.00620.59
8.3.10.0040.00422.34
8.3.00.0080.00022.77
8.2.180.0090.00616.88
8.2.170.0120.00322.96
8.2.160.0100.00721.27
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0050.00317.75
8.2.110.0050.00522.24
8.2.100.0090.00317.97
8.2.90.0040.00419.47
8.2.80.0040.00418.18
8.2.70.0060.00317.75
8.2.60.0040.00418.05
8.2.50.0080.00018.07
8.2.40.0090.00018.47
8.2.30.0070.00318.30
8.2.20.0040.00417.76
8.2.10.0000.00817.97
8.2.00.0060.00317.96
8.1.280.0070.01025.92
8.1.270.0000.00824.04
8.1.260.0110.00426.35
8.1.250.0000.00828.09
8.1.240.0000.01024.09
8.1.230.0080.00419.45
8.1.220.0040.00418.04
8.1.210.0030.00518.77
8.1.200.0030.00617.48
8.1.190.0030.00617.77
8.1.180.0080.00318.10
8.1.170.0040.00418.87
8.1.160.0030.00622.19
8.1.150.0040.00418.87
8.1.140.0030.00617.72
8.1.130.0030.00318.03
8.1.120.0070.00017.57
8.1.110.0070.00017.61
8.1.100.0040.00417.75
8.1.90.0030.00817.72
8.1.80.0070.00017.70
8.1.70.0050.00217.63
8.1.60.0080.00017.91
8.1.50.0030.00617.75
8.1.40.0050.00317.62
8.1.30.0000.00817.91
8.1.20.0050.00317.73
8.1.10.0000.00817.88
8.1.00.0000.00917.59
8.0.300.0050.00218.77
8.0.290.0030.00517.43
8.0.280.0050.00518.58
8.0.270.0030.00317.48
8.0.260.0030.00316.97
8.0.250.0000.00717.20
8.0.240.0020.00517.08
8.0.230.0000.00717.24
8.0.220.0070.00017.00
8.0.210.0040.00417.08
8.0.200.0030.00317.18
8.0.190.0030.00517.06
8.0.180.0000.00717.02
8.0.170.0040.00417.04
8.0.160.0000.00817.02
8.0.150.0060.00317.14
8.0.140.0060.00316.97
8.0.130.0000.00613.61
8.0.120.0020.00517.11
8.0.110.0000.00817.14
8.0.100.0040.00417.14
8.0.90.0080.00017.09
8.0.80.0030.01317.05
8.0.70.0050.00317.04
8.0.60.0040.00417.13
8.0.50.0080.00017.04
8.0.30.0060.01817.50
8.0.20.0150.01017.46
8.0.10.0060.00317.06
8.0.00.0110.00616.85
7.4.330.0000.00615.25
7.4.320.0000.00616.71
7.4.300.0060.00016.73
7.4.290.0030.00316.82
7.4.280.0080.00016.82
7.4.270.0000.00916.76
7.4.260.0030.00516.70
7.4.250.0000.00716.79
7.4.240.0040.00416.86
7.4.230.0040.00416.84
7.4.220.0100.01616.93
7.4.210.0050.01116.87
7.4.200.0000.00716.55
7.4.190.0080.00016.87
7.4.160.0120.00416.79
7.4.150.0140.00817.40
7.4.140.0100.01017.86
7.4.130.0110.01016.71
7.4.120.0110.00616.71
7.4.110.0070.01116.83
7.4.100.0110.00716.77
7.4.90.0050.01116.70
7.4.80.0060.01619.39
7.4.70.0070.01016.70
7.4.60.0060.01116.84
7.4.50.0000.00916.84
7.4.40.0000.01322.77
7.4.30.0070.01016.89
7.4.10.0030.01015.19
7.4.00.0070.01115.06
7.3.330.0030.00313.59
7.3.320.0030.00313.54
7.3.310.0060.00316.64
7.3.300.0040.00416.58
7.3.290.0060.00916.54
7.3.280.0120.00816.57
7.3.270.0140.00417.40
7.3.260.0130.01016.93
7.3.250.0100.00716.70
7.3.240.0080.00816.56
7.3.230.0040.01416.72
7.3.210.0080.01616.61
7.3.200.0050.01519.39
7.3.190.0000.02016.62
7.3.180.0000.01616.74
7.3.170.0130.00316.65
7.3.160.0030.01316.75
7.3.130.0030.01214.98
7.3.120.0090.00814.85
7.3.110.0070.01114.95
7.3.100.0030.00914.96
7.3.90.0090.00615.00
7.3.80.0050.00615.00
7.3.70.0030.00815.03
7.3.60.0070.00915.08
7.3.50.0100.00514.88
7.3.40.0080.00314.97
7.3.30.0100.00714.88
7.3.20.0070.00416.93
7.3.10.0020.01216.78
7.3.00.0090.00316.78
7.2.330.0050.01417.00
7.2.320.0130.00917.09
7.2.310.0060.01116.93
7.2.300.0090.00916.96
7.2.290.0110.00717.06
7.2.260.0100.00715.32
7.2.250.0070.00915.22
7.2.240.0030.01515.10
7.2.230.0060.00715.29
7.2.220.0030.00815.19
7.2.210.0030.00915.36
7.2.200.0060.00615.35
7.2.190.0070.00615.01
7.2.180.0020.01115.16
7.2.170.0070.00615.25
7.2.160.0040.00715.14
7.2.150.0060.01017.12
7.2.140.0030.01017.13
7.2.130.0080.00817.07
7.2.120.0070.00717.12
7.2.110.0000.00917.13
7.2.100.0070.00717.08
7.2.90.0040.00716.83
7.2.80.0070.00417.19
7.2.70.0100.00717.14
7.2.60.0020.01216.85
7.2.50.0060.00316.73
7.2.40.0040.01117.07
7.2.30.0050.00517.17
7.2.20.0060.00316.98
7.2.10.0060.00317.09
7.2.00.0010.01218.19
7.1.330.0030.01116.04
7.1.320.0030.00915.86
7.1.310.0060.00615.83
7.1.300.0030.01015.98
7.1.290.0030.00915.92
7.1.280.0070.00715.69
7.1.270.0050.00615.92
7.1.260.0050.00915.75
7.1.250.0110.00415.68
7.1.240.0070.00716.09
7.1.230.0030.01015.85
7.1.220.0070.01016.08
7.1.210.0080.00415.90
7.1.200.0060.00415.88
7.1.190.0040.01116.05
7.1.180.0000.01316.00
7.1.170.0000.00915.74
7.1.160.0000.01015.84
7.1.150.0000.00815.80
7.1.140.0070.00715.70
7.1.130.0080.00415.81
7.1.120.0040.00415.82
7.1.110.0060.00315.66
7.1.100.0030.00617.07
7.1.90.0070.00715.94
7.1.80.0120.00315.62
7.1.70.0040.00516.59
7.1.60.0050.01217.77
7.1.50.0030.01416.42
7.1.40.0090.00315.79
7.1.30.0060.00616.05
7.1.20.0110.00015.73
7.1.10.0060.00616.02
7.1.00.0050.04019.14
7.0.330.0120.00315.71
7.0.320.0130.00315.24
7.0.310.0100.00315.45
7.0.300.0100.00015.54
7.0.290.0040.01515.43
7.0.280.0000.01315.56
7.0.270.0060.00315.40
7.0.260.0060.01015.73
7.0.250.0100.00615.75
7.0.240.0060.00615.54
7.0.230.0100.00315.83
7.0.220.0030.00715.37
7.0.210.0060.01015.41
7.0.200.0080.00516.27
7.0.190.0000.01415.58
7.0.180.0040.00815.37
7.0.170.0040.00715.52
7.0.160.0070.00715.50
7.0.150.0120.00315.40
7.0.140.0060.04218.75
7.0.130.0030.00715.35
7.0.120.0060.00915.55
7.0.110.0030.01115.52
7.0.100.0000.01115.39
7.0.90.0040.01115.46
7.0.80.0330.04317.80
7.0.70.0280.04317.75
7.0.60.0280.04217.83
7.0.50.0300.04718.05
7.0.40.0050.04316.74
7.0.30.0070.03016.73
7.0.20.0050.04916.88
7.0.10.0070.04816.81
7.0.00.0100.03516.85
5.6.400.0000.01414.45
5.6.390.0070.00714.39
5.6.380.0030.01414.54
5.6.370.0060.00914.61
5.6.360.0060.00714.30
5.6.350.0130.00314.60
5.6.340.0030.01014.19
5.6.330.0070.00714.41
5.6.320.0000.01514.57
5.6.310.0030.01614.64
5.6.300.0040.01414.23
5.6.290.0100.00614.82
5.6.280.0050.04217.71
5.6.270.0030.01314.47
5.6.260.0100.00314.66
5.6.250.0090.00314.52
5.6.240.0040.00814.33
5.6.230.0110.04017.56
5.6.220.0080.04317.51
5.6.210.0090.04317.71
5.6.200.0030.04717.80
5.6.190.0030.05017.85
5.6.180.0100.04017.74
5.6.170.0070.04417.81
5.6.160.0080.04117.73
5.6.150.0120.03517.78
5.6.140.0050.02717.77
5.6.130.0030.04517.84
5.6.120.0070.05017.73
5.6.110.0090.04117.92
5.6.100.0080.02517.93
5.6.90.0100.03917.91
5.6.80.0050.03717.40
5.6.70.0020.04417.36
5.6.60.0080.04117.54
5.6.50.0070.04217.44
5.6.40.0070.02917.49
5.6.30.0050.03117.41
5.6.20.0060.04517.48
5.6.10.0080.03817.42
5.6.00.0080.02217.29
5.5.380.0070.00714.34
5.5.370.0020.04417.27
5.5.360.0080.02717.49
5.5.350.0030.03517.48
5.5.340.0100.03617.71
5.5.330.0080.04517.72
5.5.320.0120.04017.77
5.5.310.0090.04517.71
5.5.300.0080.02717.74
5.5.290.0070.04517.74
5.5.280.0080.04517.84
5.5.270.0090.03617.78
5.5.260.0100.02617.62
5.5.250.0050.02917.63
5.5.240.0080.03817.42
5.5.230.0050.05217.24
5.5.220.0130.02517.33
5.5.210.0070.03217.13
5.5.200.0050.03417.37
5.5.190.0080.04317.41
5.5.180.0090.04517.29
5.5.170.0120.00014.23
5.5.160.0060.04417.28
5.5.150.0080.03817.37
5.5.140.0070.04517.37
5.5.130.0000.03017.17
5.5.120.0080.03517.31
5.5.110.0100.03817.28
5.5.100.0070.04417.30
5.5.90.0060.02617.15
5.5.80.0120.04217.18
5.5.70.0070.02617.21
5.5.60.0080.03217.20
5.5.50.0070.04017.29
5.5.40.0030.02717.32
5.5.30.0080.03617.20
5.5.20.0070.02217.41
5.5.10.0050.02617.21
5.5.00.0080.02717.36
5.4.450.0090.02715.24
5.4.440.0110.03515.40
5.4.430.0050.04315.45
5.4.420.0020.04415.24
5.4.410.0070.02815.33
5.4.400.0060.04315.20
5.4.390.0110.02315.22
5.4.380.0050.03515.24
5.4.370.0080.02315.29
5.4.360.0050.02315.23
5.4.350.0050.03515.27
5.4.340.0070.04015.12
5.4.330.0000.00811.14
5.4.320.0100.03915.34
5.4.310.0080.03815.20
5.4.300.0080.02615.08
5.4.290.0070.04015.06
5.4.280.0080.04014.94
5.4.270.0080.03815.06
5.4.260.0050.03715.04
5.4.250.0060.03015.30
5.4.240.0120.02715.15
5.4.230.0080.04215.11
5.4.220.0080.03815.18
5.4.210.0030.03115.30
5.4.200.0050.04115.10
5.4.190.0160.03715.12
5.4.180.0050.02215.04
5.4.170.0070.04014.93
5.4.160.0020.03015.17
5.4.150.0030.03515.21
5.4.140.0080.02013.85
5.4.130.0030.02913.79
5.4.120.0030.02313.94
5.4.110.0050.02314.03
5.4.100.0070.02413.74
5.4.90.0060.03513.88
5.4.80.0050.02113.79
5.4.70.0020.02413.81
5.4.60.0080.02113.79
5.4.50.0040.03313.94
5.4.40.0070.03313.89
5.4.30.0040.03213.90
5.4.20.0030.02013.68
5.4.10.0060.03313.87
5.4.00.0070.03713.55
5.3.290.0110.03012.86
5.3.280.0030.03412.78
5.3.270.0080.02512.73
5.3.260.0070.02912.65
5.3.250.0000.02812.60
5.3.240.0060.02412.58
5.3.230.0070.01812.70
5.3.220.0060.02312.62
5.3.210.0070.03412.55
5.3.200.0050.03812.61
5.3.190.0000.03812.66
5.3.180.0030.02012.68
5.3.170.0050.02012.71
5.3.160.0040.02312.65
5.3.150.0050.04212.73
5.3.140.0020.02412.69
5.3.130.0030.02512.66
5.3.120.0050.02012.70
5.3.110.0030.02712.71
5.3.100.0110.02812.38
5.3.90.0080.01712.46
5.3.80.0070.03312.39
5.3.70.0030.02412.40
5.3.60.0020.04012.36
5.3.50.0040.04012.23
5.3.40.0070.03512.41
5.3.30.0080.02212.20
5.3.20.0080.03312.23
5.3.10.0030.03512.13
5.3.00.0050.03612.02
5.2.170.0030.02711.55
5.2.160.0000.03011.55
5.2.150.0030.02711.55
5.2.140.0030.04311.55
5.2.130.0130.04711.55
5.2.120.0100.06011.55
5.2.110.0030.04011.55
5.2.100.0100.04011.55
5.2.90.0070.05711.55
5.2.80.0000.04011.55
5.2.70.0000.04311.55
5.2.60.0030.05711.55
5.2.50.0030.03311.55
5.2.40.0030.03711.55
5.2.30.0070.02711.55
5.2.20.0000.03711.55
5.2.10.0000.03711.55
5.2.00.0030.03311.55
5.1.60.0070.05311.55
5.1.50.0030.02311.55
5.1.40.0030.02311.55
5.1.30.0100.05311.55
5.1.20.0100.04311.55
5.1.10.0030.03311.55
5.1.00.0000.04711.55
5.0.50.0070.03711.55
5.0.40.0030.05011.55
5.0.30.0030.05311.55
5.0.20.0030.04011.55
5.0.10.0000.03711.55
5.0.00.0170.04311.55
4.4.90.0000.05011.55
4.4.80.0000.01711.55
4.4.70.0000.01711.55
4.4.60.0000.02011.55
4.4.50.0000.01711.55
4.4.40.0000.02711.55
4.4.30.0000.02311.55
4.4.20.0030.02311.55
4.4.10.0000.04011.55
4.4.00.0030.05011.55
4.3.110.0030.03011.55
4.3.100.0030.01711.55
4.3.90.0000.03711.55
4.3.80.0070.03711.55
4.3.70.0030.03011.55
4.3.60.0030.03311.55
4.3.50.0000.02711.55
4.3.40.0000.05011.55
4.3.30.0000.01711.55
4.3.20.0000.03711.55
4.3.10.0000.02311.55
4.3.00.0070.02711.55

preferences:
44.12 ms | 401 KiB | 5 Q