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'] = (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); } 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.0140.00717.00
8.3.50.0160.00717.69
8.3.40.0070.01418.98
8.3.30.0070.00719.04
8.3.20.0080.00019.02
8.3.10.0000.00820.70
8.3.00.0000.01117.75
8.2.180.0040.01116.63
8.2.170.0130.00622.96
8.2.160.0040.01121.30
8.2.150.0020.00524.18
8.2.140.0000.00824.66
8.2.130.0090.00026.16
8.2.120.0040.00419.61
8.2.110.0060.00321.02
8.2.100.0090.00318.16
8.2.90.0030.00721.25
8.2.80.0060.00318.29
8.2.70.0030.00617.75
8.2.60.0080.00018.15
8.2.50.0040.00418.07
8.2.40.0040.00418.47
8.2.30.0070.00018.32
8.2.20.0030.00618.04
8.2.10.0040.00417.97
8.2.00.0040.00418.00
8.1.280.0150.00025.92
8.1.270.0030.00524.66
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0080.00020.98
8.1.230.0050.00321.16
8.1.220.0030.00517.80
8.1.210.0030.00619.09
8.1.200.0060.00317.50
8.1.190.0040.00417.80
8.1.180.0060.00318.10
8.1.170.0070.00019.02
8.1.160.0040.00419.09
8.1.150.0040.00418.77
8.1.140.0070.00017.68
8.1.130.0000.00818.05
8.1.120.0070.00017.65
8.1.110.0040.00417.71
8.1.100.0000.00717.51
8.1.90.0040.00417.76
8.1.80.0000.00717.61
8.1.70.0030.00517.59
8.1.60.0000.00917.88
8.1.50.0000.00817.74
8.1.40.0000.00817.78
8.1.30.0040.00417.91
8.1.20.0060.00317.83
8.1.10.0030.00517.73
8.1.00.0080.00017.79
8.0.300.0000.00820.24
8.0.290.0050.00217.00
8.0.280.0000.00818.61
8.0.270.0030.00317.50
8.0.260.0070.00017.03
8.0.250.0000.00817.24
8.0.240.0090.00017.25
8.0.230.0000.00817.19
8.0.220.0060.00317.03
8.0.210.0030.00317.19
8.0.200.0040.00417.12
8.0.190.0040.00417.21
8.0.180.0000.00717.04
8.0.170.0030.00617.16
8.0.160.0040.00417.14
8.0.150.0040.00417.15
8.0.140.0070.00317.15
8.0.130.0000.00613.58
8.0.120.0040.00717.11
8.0.110.0030.00617.02
8.0.100.0000.00717.02
8.0.90.0000.00717.05
8.0.80.0110.00417.05
8.0.70.0020.00516.99
8.0.60.0000.00717.14
8.0.50.0030.00517.18
8.0.30.0140.00517.41
8.0.20.0110.00817.48
8.0.10.0040.00417.07
8.0.00.0100.01316.89
7.4.330.0050.00013.19
7.4.320.0040.00416.63
7.4.300.0030.00316.74
7.4.290.0030.00316.72
7.4.280.0040.00416.66
7.4.270.0030.00316.93
7.4.260.0000.00513.55
7.4.250.0030.00616.64
7.4.240.0020.00516.75
7.4.230.0000.00716.82
7.4.220.0220.00016.87
7.4.210.0080.01016.83
7.4.200.0050.00216.85
7.4.190.0040.00416.84
7.4.160.0090.00916.82
7.4.150.0290.02116.75
7.4.140.0090.00916.73
7.4.130.0130.00716.68
7.4.120.0070.01016.79
7.4.110.0060.01216.81
7.4.100.0100.00716.66
7.4.90.0110.00716.89
7.4.80.0070.01019.39
7.4.70.0090.00916.73
7.4.60.0070.01716.59
7.4.50.0040.00416.69
7.4.40.0120.00316.70
7.4.30.0070.01016.82
7.4.00.0060.00915.21
7.3.330.0000.00613.39
7.3.320.0030.00313.40
7.3.310.0050.00216.71
7.3.300.0030.00516.57
7.3.290.0120.00916.57
7.3.280.0080.00916.58
7.3.270.0070.01016.68
7.3.260.0090.00916.71
7.3.250.0060.01316.69
7.3.240.0030.01316.82
7.3.230.0090.00616.65
7.3.210.0130.00316.66
7.3.200.0090.01516.91
7.3.190.0130.00816.70
7.3.180.0110.00516.89
7.3.170.0090.01216.89
7.3.160.0070.01416.56
7.3.120.0130.00314.91
7.3.10.0100.00316.55
7.3.00.0090.00016.35
7.2.330.0120.00817.05
7.2.320.0080.01217.03
7.2.310.0040.01916.85
7.2.300.0120.00616.56
7.2.290.0060.01316.76
7.2.130.0000.01416.73
7.2.120.0110.00716.78
7.2.110.0030.01016.33
7.2.100.0090.00617.11
7.2.90.0030.01016.98
7.2.80.0000.01217.02
7.2.70.0030.01016.80
7.2.60.0040.00816.64
7.2.50.0100.00017.16
7.2.40.0040.00816.60
7.2.30.0090.00316.76
7.2.20.0120.00316.43
7.2.10.0120.00617.21
7.2.00.0030.01016.95
7.1.250.0030.00615.61
7.1.100.0040.00818.14
7.1.70.0070.00417.33
7.1.60.0100.01319.40
7.1.50.0040.01816.99
7.1.00.0030.06722.58
7.0.200.0000.00816.55
7.0.140.0130.06322.12
7.0.120.0000.07722.30
7.0.60.0130.07720.14
7.0.50.0100.07718.13
7.0.40.0070.05320.04
7.0.30.0300.05320.27
7.0.20.0300.07020.40
7.0.10.0230.08720.28
7.0.00.0130.05720.32
5.6.280.0030.07021.00
5.6.210.0100.06020.93
5.6.200.0230.04018.36
5.6.190.0100.05720.77
5.6.180.0400.04720.80
5.6.170.0170.04020.53
5.6.160.0200.06020.66
5.6.150.0030.04018.23
5.6.140.0070.06018.38
5.6.130.0130.07018.38
5.6.120.0100.05021.11
5.6.110.0170.08021.04
5.6.100.0170.05321.05
5.6.90.0170.08021.03
5.6.80.0170.07020.53
5.6.70.4700.03020.43
5.5.350.0270.07320.36
5.5.340.0200.05318.21
5.5.330.0030.05320.36
5.5.320.0330.07720.45
5.5.310.0130.06020.58
5.5.300.0170.03718.11
5.5.290.0030.05018.15
5.5.280.0000.04320.82
5.5.270.0100.08021.02
5.5.260.0070.07320.82
5.5.250.0070.04320.92
5.5.240.0000.04020.42
5.4.450.0030.06719.38
5.4.440.0100.07719.52
5.4.430.0100.06719.38
5.4.420.0030.05019.61
5.4.410.0130.07319.25
5.4.400.0030.07719.16
5.4.390.0070.06019.38
5.4.380.0170.07319.38
5.4.370.0130.04719.50
5.4.360.0030.06318.92
5.4.350.0070.05319.08
5.4.340.0070.07719.18
5.4.320.0070.04019.05
5.4.310.0100.03319.38
5.4.300.0100.06019.05
5.4.290.0070.07719.08
5.4.280.0100.04019.23
5.4.270.0030.04019.28
5.4.260.0070.04319.23
5.4.250.0070.03319.38
5.4.240.0100.03019.28
5.4.230.0070.03319.44
5.4.220.0070.03319.19
5.4.210.0030.03719.21
5.4.200.0030.03719.08
5.4.190.0070.03319.16
5.4.180.0070.03319.14
5.4.170.0030.03719.36
5.4.160.0000.04019.40
5.4.150.0000.04019.20
5.4.140.0100.03016.66
5.4.130.0000.03716.54
5.4.120.0030.03316.63
5.4.110.0070.03016.80
5.4.100.0070.03016.54
5.4.90.0030.04016.59
5.4.80.0030.03316.50
5.4.70.0070.03716.57
5.4.60.0000.03716.50
5.4.50.0000.04016.45
5.4.40.0070.03016.57
5.4.30.0000.04016.56
5.4.20.0030.03316.39
5.4.10.0030.03716.56
5.4.00.0030.03315.98
5.3.290.0100.04314.83
5.3.280.0000.04314.74
5.3.270.0000.04014.86
5.3.260.0130.02714.62
5.3.250.0100.03014.61
5.3.240.0070.03314.64
5.3.230.0030.03714.85
5.3.220.0000.04014.82
5.3.210.0030.03714.58
5.3.200.0030.03714.78
5.3.190.0030.03714.78
5.3.180.0030.03714.68
5.3.170.0030.03714.78
5.3.160.0070.03314.57
5.3.150.0000.04014.81
5.3.140.0030.03714.68
5.3.130.0030.04014.79
5.3.120.0000.04314.81
5.3.110.0100.03014.75
5.3.100.0070.03314.07
5.3.90.0070.03714.16
5.3.80.0000.04014.13
5.3.70.0070.03314.04
5.3.60.0070.06714.05
5.3.50.0070.03714.05
5.3.40.0070.03714.05
5.3.30.0000.04314.07
5.3.20.0130.05313.85
5.3.10.0000.04013.68
5.3.00.0070.08313.87
5.2.170.0000.05311.26
5.2.160.0000.03711.25
5.2.150.0070.06311.35
5.2.140.0070.06011.28
5.2.130.0170.05711.37
5.2.120.0000.06711.26
5.2.110.0100.05711.31
5.2.100.0070.05311.21
5.2.90.0000.04711.30
5.2.80.0000.03711.30
5.2.70.0030.06011.14
5.2.60.0030.06311.16
5.2.50.0130.04711.23
5.2.40.0070.04711.23
5.2.30.0030.06311.16
5.2.20.0100.04711.00
5.2.10.0030.03711.02
5.2.00.0070.03710.87
5.1.60.0070.05310.15
5.1.50.0030.05310.13
5.1.40.0000.05710.12
5.1.30.0070.05310.36
5.1.20.0100.04310.44
5.1.10.0100.03310.14
5.1.00.0000.03710.17
5.0.50.0070.0278.61
5.0.40.0000.0508.48
5.0.30.0030.0578.46
5.0.20.0070.0278.39
5.0.10.0070.0308.34
5.0.00.0000.0638.32
4.4.90.0000.0307.97
4.4.80.0070.0307.97
4.4.70.0030.0307.97
4.4.60.0000.0177.97
4.4.50.0030.0277.97
4.4.40.0070.0477.97
4.4.30.0000.0377.97
4.4.20.0070.0337.97
4.4.10.0000.0207.97
4.4.00.0000.0407.97
4.3.110.0000.0307.97
4.3.100.0000.0337.97
4.3.90.0000.0307.97
4.3.80.0030.0537.97
4.3.70.0030.0307.97
4.3.60.0030.0277.97
4.3.50.0070.0277.97
4.3.40.0070.0337.97
4.3.30.0030.0277.97
4.3.20.0000.0377.97
4.3.10.0030.0207.97
4.3.00.0000.0377.97

preferences:
35.83 ms | 401 KiB | 5 Q