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){ $s = array(); foreach ($xml as $key => $value) { $s[$key] = null; if (count($value->attributes())) $s[$key]['attributes'] = $value->attributes(); if (is_string($value)) $s[$key]['content'] = $value; print_r(array( 'key' => $key, 'hasChildren' => (bool)$xml->hasChildren(), 'attributes' => $value->attributes(), 'stack' => $s, )); if (get_class($value) == 'SimpleXMLIterator') f($value); } return $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.0150.00018.40
8.3.50.0090.01021.26
8.3.40.0030.01319.14
8.3.30.0080.00818.84
8.3.20.0080.00819.02
8.3.10.0090.00021.20
8.3.00.0050.00322.10
8.2.180.0060.01516.75
8.2.170.0140.00022.96
8.2.160.0100.00720.60
8.2.150.0030.00624.18
8.2.140.0090.00024.66
8.2.130.0060.00326.16
8.2.120.0000.00821.17
8.2.110.0060.00322.50
8.2.100.0040.00718.09
8.2.90.0030.00518.09
8.2.80.0050.00317.97
8.2.70.0050.00517.75
8.2.60.0030.00618.18
8.2.50.0030.00518.07
8.2.40.0030.00618.49
8.2.30.0050.00521.44
8.2.20.0000.00917.93
8.2.10.0000.00817.98
8.2.00.0050.00317.86
8.1.280.0120.00625.92
8.1.270.0040.00423.99
8.1.260.0190.00026.35
8.1.250.0040.01428.09
8.1.240.0000.00922.57
8.1.230.0060.00621.35
8.1.220.0000.00818.02
8.1.210.0040.00419.02
8.1.200.0000.00817.60
8.1.190.0030.00517.48
8.1.180.0030.00619.36
8.1.170.0060.00318.86
8.1.160.0000.00719.14
8.1.150.0000.01118.89
8.1.140.0040.00417.73
8.1.130.0070.00017.97
8.1.120.0040.00417.77
8.1.110.0000.00717.72
8.1.100.0040.00417.79
8.1.90.0040.00417.60
8.1.80.0040.00417.79
8.1.70.0030.00317.70
8.1.60.0030.00617.87
8.1.50.0060.00317.62
8.1.40.0000.01017.78
8.1.30.0090.00017.87
8.1.20.0050.00317.76
8.1.10.0030.00517.72
8.1.00.0030.00517.78
8.0.300.0000.00720.27
8.0.290.0040.00416.88
8.0.280.0000.00718.67
8.0.270.0030.00617.41
8.0.260.0070.00017.06
8.0.250.0000.00817.27
8.0.240.0100.00017.23
8.0.230.0000.00717.20
8.0.220.0040.00417.18
8.0.210.0030.00617.13
8.0.200.0030.00317.13
8.0.190.0040.00417.25
8.0.180.0030.00517.09
8.0.170.0000.00817.23
8.0.160.0070.00017.01
8.0.150.0040.00417.23
8.0.140.0090.00317.02
8.0.130.0030.00313.66
8.0.120.0030.00517.02
8.0.110.0050.00317.09
8.0.100.0000.00717.10
8.0.90.0030.00517.24
8.0.80.0100.00617.14
8.0.70.0050.00317.18
8.0.60.0060.00317.24
8.0.50.0070.00016.98
8.0.30.0060.01417.27
8.0.20.0110.00917.46
8.0.10.0000.00717.14
8.0.00.0050.01416.85
7.4.330.0000.00516.91
7.4.320.0030.00616.70
7.4.300.0030.00316.94
7.4.290.0000.00716.72
7.4.280.0050.00316.68
7.4.270.0030.00316.76
7.4.260.0050.00013.43
7.4.250.0050.00316.75
7.4.240.0000.00716.92
7.4.230.0030.00316.83
7.4.220.0090.00916.72
7.4.210.0050.01116.80
7.4.200.0040.00416.84
7.4.190.0040.00416.85
7.4.160.0040.01516.78
7.4.150.0060.01217.40
7.4.140.0070.01017.86
7.4.130.0100.01116.83
7.4.120.0090.00916.72
7.4.110.0130.00416.95
7.4.100.0100.00716.88
7.4.90.0090.00916.77
7.4.80.0150.00319.39
7.4.70.0120.00616.74
7.4.60.0130.00616.72
7.4.50.0050.00316.83
7.4.40.0100.00722.77
7.4.30.0140.00317.00
7.4.00.0050.01215.33
7.3.330.0000.00613.46
7.3.320.0000.00613.46
7.3.310.0030.00316.69
7.3.300.0000.00716.62
7.3.290.0110.00316.62
7.3.280.0110.00816.60
7.3.270.0090.01017.40
7.3.260.0150.00718.24
7.3.250.0070.01316.82
7.3.240.0130.00616.62
7.3.230.0150.00316.84
7.3.210.0130.00716.62
7.3.200.0110.00719.39
7.3.190.0150.00816.67
7.3.180.0150.00716.52
7.3.170.0100.00716.54
7.3.160.0070.01016.93
7.3.120.0050.01114.91
7.3.110.0030.01514.98
7.3.100.0030.01014.65
7.3.90.0000.01315.14
7.3.80.0090.00014.86
7.3.70.0060.00314.93
7.3.60.0070.01114.96
7.3.50.0070.01015.07
7.3.40.0040.00914.88
7.3.30.0080.00814.73
7.3.20.0070.01016.71
7.3.10.0100.00716.66
7.3.00.0050.00716.71
7.2.330.0170.00416.85
7.2.320.0190.00317.00
7.2.310.0060.01617.01
7.2.300.0060.01316.68
7.2.290.0060.01116.96
7.2.250.0040.01115.35
7.2.240.0000.02115.18
7.2.230.0120.00614.90
7.2.220.0060.01214.84
7.2.210.0060.00615.12
7.2.200.0060.00314.88
7.2.190.0110.00715.25
7.2.180.0110.00815.20
7.2.170.0090.00415.16
7.2.130.0000.01316.82
7.2.120.0030.01017.11
7.2.110.0030.01316.90
7.2.100.0070.00716.69
7.2.90.0110.00316.99
7.2.80.0000.01316.91
7.2.70.0060.00616.96
7.2.60.0040.01117.13
7.2.50.0040.00816.96
7.2.40.0060.00616.94
7.2.30.0030.00617.11
7.2.20.0000.01117.22
7.2.10.0060.00616.84
7.2.00.0030.01016.96
7.1.330.0150.00015.78
7.1.320.0000.00915.91
7.1.310.0120.00315.82
7.1.300.0090.00915.64
7.1.290.0120.00315.89
7.1.280.0000.01415.61
7.1.270.0080.00415.92
7.1.260.0030.01015.80
7.1.250.0060.00315.83
7.1.240.0070.00315.83
7.1.230.0040.01116.07
7.1.220.0030.00615.71
7.1.210.0040.01115.70
7.1.200.0040.00816.16
7.1.190.0110.00415.91
7.1.180.0050.00515.93
7.1.170.0040.00815.81
7.1.160.0030.00915.70
7.1.150.0040.00415.99
7.1.140.0120.00015.76
7.1.130.0100.00315.77
7.1.120.0030.00615.92
7.1.110.0070.01016.00
7.1.100.0060.00616.16
7.1.90.0080.00615.86
7.1.80.0000.01415.82
7.1.70.0050.00616.59
7.1.60.0060.01317.60
7.1.50.0070.01116.28
7.1.40.0080.00615.78
7.1.30.0040.00416.01
7.1.20.0000.01015.88
7.1.10.0130.00015.88
7.1.00.0020.04419.00
7.0.330.0130.00315.38
7.0.320.0130.00615.44
7.0.310.0070.00715.46
7.0.300.0110.00715.41
7.0.290.0090.00915.55
7.0.280.0100.01015.48
7.0.270.0000.01415.48
7.0.260.0030.01715.46
7.0.250.0070.00315.52
7.0.240.0110.00415.45
7.0.230.0030.01015.36
7.0.220.0060.00615.34
7.0.210.0030.00915.50
7.0.200.0050.01116.29
7.0.190.0060.00915.50
7.0.180.0070.00715.68
7.0.170.0070.00715.40
7.0.160.0080.00415.87
7.0.150.0120.00615.41
7.0.140.0100.03718.80
7.0.130.0060.00915.27
7.0.120.0150.00015.71
7.0.110.0060.00915.82
7.0.100.0090.03917.73
7.0.90.0220.04317.65
7.0.80.0090.03717.82
7.0.70.0180.04317.74
7.0.60.0330.04217.75
7.0.50.0180.02317.90
7.0.40.0070.02816.78
7.0.30.0170.02416.82
7.0.20.0080.02516.71
7.0.10.0130.04316.84
7.0.00.0130.04216.80
5.6.380.0100.00714.29
5.6.370.0080.00614.61
5.6.360.0090.00314.22
5.6.350.0030.01314.65
5.6.340.0110.00414.58
5.6.330.0030.01214.67
5.6.320.0030.01314.05
5.6.310.0070.01014.78
5.6.300.0070.00714.66
5.6.290.0030.01414.48
5.6.280.0080.03817.56
5.6.270.0110.00414.25
5.6.260.0110.00414.48
5.6.250.0110.02517.46
5.6.240.0090.04717.76
5.6.230.0100.02617.88
5.6.220.0180.02217.58
5.6.210.0080.02517.36
5.6.200.0170.04217.79
5.6.190.0160.03817.97
5.6.180.0130.03817.69
5.6.170.0140.03817.87
5.6.160.0080.02817.82
5.6.150.0120.04317.74
5.6.140.0060.04017.81
5.6.130.0110.04517.71
5.6.120.0110.04517.89
5.6.110.0080.04817.86
5.6.100.0070.05017.84
5.6.90.0130.04017.73
5.6.80.0140.03417.46
5.6.70.0180.03817.50
5.6.60.0120.03317.52
5.6.50.0110.03317.50
5.6.40.0100.03617.52
5.6.30.0070.03517.36
5.6.20.0130.04117.44
5.6.10.0130.04017.34
5.6.00.0060.04317.42
5.5.380.0120.03216.06
5.5.370.0110.03515.92
5.5.360.0130.04315.92
5.5.350.0110.03615.88
5.5.340.0110.03916.23
5.5.330.0050.05016.06
5.5.320.0030.03016.19
5.5.310.0090.03216.18
5.5.300.0080.04516.09
5.5.290.0130.04216.29
5.5.280.0050.04716.13
5.5.270.0120.04515.91
5.5.260.0140.04216.09
5.5.250.0030.04216.07
5.5.240.0100.03715.81
5.5.230.0130.03715.87
5.5.220.0100.04415.77
5.5.210.0020.04915.93
5.5.200.0100.04215.77
5.5.190.0050.04615.86
5.5.180.0100.04415.86
5.5.170.0070.00711.43
5.5.160.0110.02315.80
5.5.150.0070.02615.75
5.5.140.0120.04315.77
5.5.130.0100.03815.79
5.5.120.0150.02215.76
5.5.110.0040.04615.81
5.5.100.0120.04215.87
5.5.90.0080.02515.56
5.5.80.0110.02815.74
5.5.70.0050.04415.78
5.5.60.0120.03015.57
5.5.50.0120.03715.63
5.5.40.0110.04015.64
5.5.30.0100.03315.66
5.5.20.0120.04015.70
5.5.10.0070.04015.64
5.5.00.0110.03415.72
5.4.450.0080.04215.45
5.4.440.0070.04015.30
5.4.430.0080.04015.18
5.4.420.0110.04215.30
5.4.410.0100.02415.43
5.4.400.0080.02715.26
5.4.390.0050.04414.96
5.4.380.0150.03514.98
5.4.370.0080.02715.24
5.4.360.0130.03215.26
5.4.350.0050.04415.18
5.4.340.0160.02815.11
5.4.330.0040.00411.27
5.4.320.0080.04015.40
5.4.310.0090.02215.26
5.4.300.0120.04015.16
5.4.290.0180.03215.22
5.4.280.0100.03715.21
5.4.270.0050.04115.07
5.4.260.0040.04815.23
5.4.250.0110.03815.12
5.4.240.0090.04015.20
5.4.230.0110.03815.14
5.4.220.0110.03615.03
5.4.210.0100.02415.36
5.4.200.0070.02415.07
5.4.190.0050.02915.07
5.4.180.0130.02015.32
5.4.170.0050.03815.17
5.4.160.0080.03115.10
5.4.150.0150.03715.12
5.4.140.0120.02013.94
5.4.130.0100.04613.88
5.4.120.0130.03214.06
5.4.110.0070.03014.08
5.4.100.0110.03714.02
5.4.90.0070.01814.04
5.4.80.0030.04313.77
5.4.70.0100.02114.04
5.4.60.0050.03713.84
5.4.50.0100.03214.04
5.4.40.0140.03214.00
5.4.30.0060.04113.95
5.4.20.0140.03313.82
5.4.10.0080.03513.95
5.4.00.0030.03813.68
5.3.290.0080.04412.86
5.3.280.0120.04012.68
5.3.270.0140.03312.82
5.3.260.0130.04712.79
5.3.250.0150.03012.74
5.3.240.0100.03512.68
5.3.230.0110.02712.73
5.3.220.0110.02812.63
5.3.210.0100.04012.60
5.3.200.0120.02312.80
5.3.190.0050.03012.63
5.3.180.0120.03712.76
5.3.170.0050.04212.71
5.3.160.0090.02912.80
5.3.150.0150.03212.75
5.3.140.0100.02312.79
5.3.130.0090.04012.69
5.3.120.0100.04012.74
5.3.110.0100.02612.80
5.3.100.0110.02112.49
5.3.90.0060.02012.57
5.3.80.0060.03812.50
5.3.70.0110.03812.36
5.3.60.0070.04012.34
5.3.50.0110.03612.42
5.3.40.0060.04112.32
5.3.30.0110.03512.42
5.3.20.0050.02212.18
5.3.10.0070.03912.14
5.3.00.0050.03612.12
5.2.170.0100.03210.44
5.2.160.0070.02210.58
5.2.150.0100.03310.48
5.2.140.0110.03110.46
5.2.130.0020.04010.46
5.2.120.0060.02510.52
5.2.110.0070.03210.42
5.2.100.0050.02210.50
5.2.90.0080.02710.41
5.2.80.0060.03610.30
5.2.70.0080.02310.44
5.2.60.0100.03310.39
5.2.50.0080.02210.31
5.2.40.0100.03310.36
5.2.30.0060.02810.20
5.2.20.0140.02610.26
5.2.10.0080.03510.22
5.2.00.0080.01810.04
5.1.60.0050.0339.42
5.1.50.0080.0279.38
5.1.40.0030.0269.43
5.1.30.0100.0259.56
5.1.20.0060.0269.70
5.1.10.0070.0249.50
5.1.00.0090.0229.42
5.0.50.0030.0288.48
5.0.40.0030.0178.51
5.0.30.0060.0328.42
5.0.20.0020.0188.27
5.0.10.0130.0238.39
5.0.00.0050.0288.33
4.4.90.0030.0188.27
4.4.80.0030.0128.27
4.4.70.0030.0118.27
4.4.60.0000.0128.27
4.4.50.0000.0158.27
4.4.40.0020.0238.27
4.4.30.0050.0118.27
4.4.20.0020.0198.27
4.4.10.0020.0208.27
4.4.00.0040.0228.27
4.3.110.0020.0188.27
4.3.100.0000.0188.27
4.3.90.0000.0198.27
4.3.80.0040.0248.27
4.3.70.0020.0158.27
4.3.60.0040.0188.27
4.3.50.0070.0088.27
4.3.40.0020.0278.27
4.3.30.0010.0198.27
4.3.20.0030.0188.27
4.3.10.0050.0158.27
4.3.00.0000.0208.27

preferences:
64.29 ms | 401 KiB | 5 Q