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) { $s = count($stack) ? $stack : array(); foreach ($xml as $key => $value) { $s[$key] = null; if (count($value->attributes())) $s[$key]['attributes'] = (array)$value->attributes(); if (is_string($value)) $s[$key]['content'] = (string)$value; /*print_r(array( 'key' => $key, 'hasChildren' => (bool)$xml->hasChildren(), 'attributes' => (array)$value->attributes(), 'stack' => $s, ));*/ var_dump(get_class($value)); if (get_class($value) == 'SimpleXMLIterator') f($value, $s); } return $s; } print_r(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.0060.00817.00
8.3.50.0130.00516.94
8.3.40.0070.00719.12
8.3.30.0150.00319.14
8.3.20.0040.00418.95
8.3.10.0080.00020.90
8.3.00.0030.00719.38
8.2.180.0120.00917.00
8.2.170.0080.00822.96
8.2.160.0100.00321.39
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00019.83
8.2.110.0030.00719.64
8.2.100.0060.00617.97
8.2.90.0060.00319.35
8.2.80.0060.00317.97
8.2.70.0080.00017.88
8.2.60.0000.00818.05
8.2.50.0050.00318.07
8.2.40.0040.00418.47
8.2.30.0040.00418.21
8.2.20.0030.00617.91
8.2.10.0070.00018.02
8.2.00.0050.00317.89
8.1.280.0090.00625.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.39
8.1.230.0040.00820.91
8.1.220.0000.00918.01
8.1.210.0040.00418.77
8.1.200.0000.00917.50
8.1.190.0030.00617.66
8.1.180.0040.00418.10
8.1.170.0000.00819.05
8.1.160.0040.00419.13
8.1.150.0040.00418.90
8.1.140.0030.00717.63
8.1.130.0070.00018.02
8.1.120.0000.00717.70
8.1.110.0040.00417.54
8.1.100.0060.00317.71
8.1.90.0050.00217.51
8.1.80.0000.00717.57
8.1.70.0030.00317.64
8.1.60.0030.00617.67
8.1.50.0000.00717.57
8.1.40.0000.00817.66
8.1.30.0000.00717.79
8.1.20.0060.00317.77
8.1.10.0000.00817.76
8.1.00.0000.01017.62
8.0.300.0030.00518.77
8.0.290.0080.00017.00
8.0.280.0030.00318.59
8.0.270.0030.00317.34
8.0.260.0030.00317.13
8.0.250.0000.00717.23
8.0.240.0000.00917.27
8.0.230.0070.00017.09
8.0.220.0030.00717.17
8.0.210.0040.00317.03
8.0.200.0000.00717.13
8.0.190.0030.00517.07
8.0.180.0000.00817.02
8.0.170.0030.00517.07
8.0.160.0000.00717.16
8.0.150.0070.00317.18
8.0.140.0000.00917.00
8.0.130.0000.00513.53
8.0.120.0000.00816.96
8.0.110.0000.00717.05
8.0.100.0040.00417.20
8.0.90.0070.00017.01
8.0.80.0030.01217.16
8.0.70.0040.00417.04
8.0.60.0000.00817.08
8.0.50.0040.00417.13
8.0.30.0140.00817.50
8.0.20.0180.00617.33
8.0.10.0000.00817.12
8.0.00.0060.01417.14
7.4.330.0020.00213.05
7.4.320.0000.00616.54
7.4.300.0070.00016.76
7.4.290.0030.00316.86
7.4.280.0040.00416.89
7.4.270.0080.00016.77
7.4.260.0060.00013.46
7.4.250.0000.00816.78
7.4.240.0000.00716.81
7.4.230.0040.00416.95
7.4.220.0100.01116.70
7.4.210.0070.01016.83
7.4.200.0080.00016.81
7.4.190.0050.00316.99
7.4.160.0130.00616.71
7.4.150.0090.00916.83
7.4.140.0150.00216.67
7.4.130.0060.01516.71
7.4.120.0110.00916.78
7.4.110.0090.01116.81
7.4.100.0060.01116.71
7.4.90.0170.00016.77
7.4.80.0100.00716.76
7.4.70.0120.00616.55
7.4.60.0150.00216.77
7.4.50.0060.00316.74
7.4.40.0070.00716.96
7.4.30.0130.00316.86
7.4.10.0100.01015.25
7.4.00.0070.00915.20
7.3.330.0030.00313.58
7.3.320.0030.00313.60
7.3.310.0030.00316.62
7.3.300.0000.00716.54
7.3.290.0070.00816.60
7.3.280.0060.01016.53
7.3.270.0070.01016.72
7.3.260.0030.01416.63
7.3.250.0110.00716.57
7.3.240.0060.01216.59
7.3.230.0080.00816.56
7.3.210.0140.00316.75
7.3.200.0070.01419.39
7.3.190.0100.00716.59
7.3.180.0060.01016.59
7.3.170.0060.01016.53
7.3.160.0120.00616.73
7.3.130.0070.00715.14
7.3.120.0120.00414.90
7.3.110.0090.00914.83
7.3.100.0070.00714.53
7.3.90.0090.00614.86
7.3.80.0000.00915.00
7.3.70.0030.00714.77
7.3.60.0000.01214.95
7.3.50.0070.00714.86
7.3.40.0060.00614.81
7.3.30.0030.00715.04
7.3.20.0000.01216.62
7.3.10.0060.00616.69
7.3.00.0070.00416.84
7.2.330.0140.00316.68
7.2.320.0000.01916.81
7.2.310.0140.01216.78
7.2.300.0030.02016.48
7.2.290.0140.00416.58
7.2.260.0080.00914.96
7.2.250.0080.01115.32
7.2.240.0060.00915.21
7.2.230.0090.00614.74
7.2.220.0030.00714.90
7.2.210.0090.00614.82
7.2.200.0060.00614.93
7.2.190.0090.00614.94
7.2.180.0030.00615.00
7.2.170.0040.01415.01
7.2.160.0040.00815.07
7.2.150.0040.00816.84
7.2.140.0060.00916.84
7.2.130.0060.00816.71
7.2.120.0050.00816.81
7.2.110.0160.00716.67
7.2.100.0070.00616.90
7.2.90.0030.01116.74
7.2.80.0070.00716.84
7.2.70.0010.01016.83
7.2.60.0070.00716.84
7.2.50.0040.00616.86
7.2.40.0030.00916.77
7.2.30.0110.00416.90
7.2.20.0050.00616.83
7.2.10.0020.01116.81
7.2.00.0080.00716.67
7.1.330.0030.00615.65
7.1.320.0060.00615.79
7.1.310.0030.00615.64
7.1.300.0090.00615.79
7.1.290.0040.00715.87
7.1.280.0040.00815.68
7.1.270.0070.00715.79
7.1.260.0080.00815.66
7.1.250.0040.00715.68
7.1.240.0030.00715.73
7.1.230.0060.00615.61
7.1.220.0040.00815.54
7.1.210.0000.01315.80
7.1.200.0040.00615.64
7.1.190.0110.00315.61
7.1.180.0030.01315.77
7.1.170.0030.01215.60
7.1.160.0080.00015.53
7.1.150.0030.01015.71
7.1.140.0120.00315.61
7.1.130.0050.00515.52
7.1.120.0070.00315.94
7.1.110.0060.00615.50
7.1.100.0050.00716.82
7.1.90.0030.01016.05
7.1.80.0100.00015.84
7.1.70.0000.00916.47
7.1.60.0070.00717.62
7.1.50.0080.01216.30
7.1.40.0080.00415.85
7.1.30.0000.01315.54
7.1.20.0000.01315.33
7.1.10.0000.01015.85
7.1.00.0030.04319.08
7.0.330.0060.00315.53
7.0.320.0000.01015.24
7.0.310.0030.00615.75
7.0.300.0060.00315.63
7.0.290.0000.00915.50
7.0.280.0070.00715.43
7.0.270.0000.00915.49
7.0.260.0000.01415.38
7.0.250.0080.00315.28
7.0.240.0070.01015.62
7.0.230.0060.00915.73
7.0.220.0040.00415.31
7.0.210.0060.00915.38
7.0.200.0070.00415.99
7.0.190.0070.01015.28
7.0.180.0090.00615.48
7.0.170.0000.01715.49
7.0.160.0120.00315.71
7.0.150.0140.00315.35
7.0.140.0140.03318.82
7.0.130.0110.00315.79
7.0.120.0050.03418.87
7.0.110.0140.00315.50
7.0.100.0030.01015.66
7.0.90.0070.00715.58
7.0.80.0030.01015.52
7.0.70.0090.00615.41
7.0.60.0150.03817.74
7.0.50.0040.02916.76
7.0.40.0050.02517.09
7.0.30.0330.03517.01
7.0.20.0160.04316.86
7.0.10.0030.02716.94
7.0.00.0110.03916.96
5.6.400.0000.00914.47
5.6.390.0060.00614.13
5.6.380.0100.00714.67
5.6.370.0040.00714.63
5.6.360.0130.00014.52
5.6.350.0000.01414.86
5.6.340.0000.00914.52
5.6.330.0100.00314.32
5.6.320.0090.00714.80
5.6.310.0090.00614.76
5.6.300.0100.00714.32
5.6.290.0030.01214.60
5.6.280.0020.04017.87
5.6.270.0100.00314.98
5.6.260.0040.00814.68
5.6.250.0030.01414.80
5.6.240.0030.01014.39
5.6.230.0030.01014.36
5.6.220.0000.01514.36
5.6.210.0000.02917.59
5.6.200.0070.04616.45
5.6.190.0060.02817.70
5.6.180.0230.02817.72
5.6.170.0130.03717.83
5.6.160.0080.03817.53
5.6.150.0070.04216.26
5.6.140.0050.03716.38
5.6.130.0070.02516.42
5.6.120.0100.04018.01
5.6.110.0110.04517.98
5.6.100.0070.04417.69
5.6.90.0050.03917.89
5.6.80.0100.04217.47
5.6.70.0070.00714.40
5.6.60.0110.00414.54
5.6.50.0060.00914.40
5.6.40.0030.00614.63
5.6.30.0030.01014.48
5.6.20.0000.01714.40
5.6.10.0090.00914.71
5.6.00.0110.00414.49
5.5.380.0070.00714.54
5.5.370.0070.00314.65
5.5.360.0040.00814.25
5.5.350.0110.04417.74
5.5.340.0100.03916.36
5.5.330.0070.03517.57
5.5.320.0150.04317.57
5.5.310.0180.04017.46
5.5.300.0070.03216.32
5.5.290.0030.03216.33
5.5.280.0050.02217.74
5.5.270.0100.04417.65
5.5.260.0090.04717.64
5.5.250.0070.04517.41
5.5.240.0980.02517.48
5.5.230.0060.00314.30
5.5.220.0040.01114.27
5.5.210.0100.00714.36
5.5.200.0040.00714.46
5.5.190.0130.00014.61
5.5.180.0060.00914.70
5.5.170.0070.00714.53
5.5.160.0040.01414.71
5.5.150.0030.00714.46
5.5.140.0120.00014.13
5.5.130.0100.00314.52
5.5.120.0060.00614.45
5.5.110.0070.00714.45
5.5.100.0040.01114.34
5.5.90.0100.00314.44
5.5.80.0030.01014.54
5.5.70.0100.00614.40
5.5.60.0030.00914.45
5.5.50.0090.00614.65
5.5.40.0030.01014.38
5.5.30.0120.00014.30
5.5.20.0100.00614.46
5.5.10.0130.00314.56
5.5.00.0130.00314.36
5.4.450.0030.02515.42
5.4.440.0070.03015.43
5.4.430.0030.02915.41
5.4.420.0030.04515.56
5.4.410.0120.03115.40
5.4.400.0030.03815.26
5.4.390.0080.03015.10
5.4.380.0060.02615.48
5.4.370.0050.04315.38
5.4.360.0090.03915.40
5.4.350.0030.02515.23
5.4.340.0030.04615.09
5.4.330.0040.00711.03
5.4.320.0060.02115.29
5.4.310.0050.02215.12
5.4.300.0080.03515.31
5.4.290.0070.02515.12
5.4.280.0020.03315.28
5.4.270.0080.03715.13
5.4.260.0060.04315.11
5.4.250.0030.03815.26
5.4.240.0050.03015.23
5.4.230.0070.02715.08
5.4.220.0100.03715.19
5.4.210.0080.02214.89
5.4.200.0050.03815.11
5.4.190.0000.02915.13
5.4.180.0070.04015.40
5.4.170.0100.02515.32
5.4.160.0040.04015.30
5.4.150.0020.04615.27
5.4.140.0020.03513.98
5.4.130.0030.02814.00
5.4.120.0090.03713.95
5.4.110.0070.01814.00
5.4.100.0000.02613.93
5.4.90.0070.03313.92
5.4.80.0060.02813.93
5.4.70.0070.02413.80
5.4.60.0060.02313.84
5.4.50.0070.01713.95
5.4.40.0080.01813.81
5.4.30.0080.02313.95
5.4.20.0030.03013.76
5.4.10.0090.02814.00
5.4.00.0020.02213.56
5.3.290.0030.04714.84
5.3.280.0070.03714.72
5.3.270.0100.07314.77
5.3.260.0030.06014.79
5.3.250.0030.04014.76
5.3.240.0070.07314.71
5.3.230.0170.04714.76
5.3.220.0100.07014.68
5.3.210.0070.05014.68
5.3.200.0000.05014.80
5.3.190.0100.03714.71
5.3.180.0030.04714.78
5.3.170.0100.04014.76
5.3.160.0130.07014.76
5.3.150.0070.07714.69
5.3.140.0070.05014.72
5.3.130.0000.05014.66
5.3.120.0130.07014.65
5.3.110.0070.07314.67
5.3.100.0130.03314.20
5.3.90.0100.05014.23
5.3.80.0070.07714.21
5.3.70.0100.05714.16
5.3.60.0030.07014.03
5.3.50.0000.08714.14
5.3.40.0100.04014.15
5.3.30.0030.05014.14
5.3.20.0030.08013.75
5.3.10.0030.07313.69
5.3.00.0130.06713.83
5.2.170.0070.06011.36
5.2.160.0100.05711.20
5.2.150.0070.05011.37
5.2.140.0070.04311.27
5.2.130.0100.05311.29
5.2.120.0070.03311.14
5.2.110.0000.06011.16
5.2.100.0100.03711.25
5.2.90.0030.04011.34
5.2.80.0070.04311.25
5.2.70.0100.03011.29
5.2.60.0030.03311.11
5.2.50.0000.05011.18
5.2.40.0000.05311.14
5.2.30.0000.03011.00
5.2.20.0070.02711.02
5.2.10.0030.03011.08
5.2.00.0030.03710.96
5.1.60.0030.03310.05
5.1.50.0030.04710.18
5.1.40.0030.05010.13
5.1.30.0100.05310.54
5.1.20.0000.06310.59
5.1.10.0030.05710.06
5.1.00.0170.04710.22
5.0.50.0070.0438.71
5.0.40.0030.0478.64
5.0.30.0000.0378.38
5.0.20.0030.0438.31
5.0.10.0030.0438.41
5.0.00.0000.0378.17
4.4.90.0000.0408.09
4.4.80.0000.0308.09
4.4.70.0030.0138.09
4.4.60.0030.0178.09
4.4.50.0000.0208.09
4.4.40.0070.0338.09
4.4.30.0030.0178.09
4.4.20.0070.0338.09
4.4.10.0070.0308.09
4.4.00.0000.0278.09
4.3.110.0030.0238.09
4.3.100.0030.0338.09
4.3.90.0000.0178.09
4.3.80.0000.0478.09
4.3.70.0070.0278.09
4.3.60.0000.0308.09
4.3.50.0070.0178.09
4.3.40.0070.0378.09
4.3.30.0000.0378.09
4.3.20.0000.0338.09
4.3.10.0030.0278.09
4.3.00.0000.0208.09

preferences:
47.64 ms | 401 KiB | 5 Q