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, $xml->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.0110.00416.75
8.3.50.0160.00617.67
8.3.40.0100.00718.93
8.3.30.0160.00318.96
8.3.20.0040.00418.85
8.3.10.0090.00020.73
8.3.00.0050.00319.50
8.2.180.0070.00716.75
8.2.170.0090.00622.96
8.2.160.0110.00421.32
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0080.00019.36
8.2.110.0090.00019.50
8.2.100.0090.00318.03
8.2.90.0050.00318.16
8.2.80.0030.00518.00
8.2.70.0060.00317.63
8.2.60.0080.00018.05
8.2.50.0040.00418.07
8.2.40.0050.00318.47
8.2.30.0000.00818.25
8.2.20.0040.00417.93
8.2.10.0040.00417.91
8.2.00.0050.00317.88
8.1.280.0070.00725.92
8.1.270.0040.01222.31
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.01124.11
8.1.230.0070.00421.07
8.1.220.0080.00017.91
8.1.210.0080.00019.12
8.1.200.0030.00617.38
8.1.190.0020.00517.66
8.1.180.0000.00818.10
8.1.170.0000.00819.11
8.1.160.0060.00319.07
8.1.150.0000.00718.86
8.1.140.0080.00017.67
8.1.130.0040.00418.00
8.1.120.0000.00817.56
8.1.110.0040.00417.56
8.1.100.0030.00417.76
8.1.90.0030.00617.52
8.1.80.0040.00417.59
8.1.70.0030.00617.59
8.1.60.0080.00017.84
8.1.50.0000.00817.73
8.1.40.0040.00417.70
8.1.30.0080.00017.89
8.1.20.0030.00517.69
8.1.10.0000.00817.66
8.1.00.0070.00017.73
8.0.300.0040.00420.27
8.0.290.0040.00417.00
8.0.280.0070.00018.66
8.0.270.0000.00717.49
8.0.260.0000.00717.05
8.0.250.0080.00017.14
8.0.240.0040.00417.00
8.0.230.0030.00317.06
8.0.220.0070.00017.12
8.0.210.0000.00817.01
8.0.200.0040.00417.12
8.0.190.0000.00717.09
8.0.180.0000.00717.21
8.0.170.0000.00717.07
8.0.160.0000.00717.24
8.0.150.0040.00417.14
8.0.140.0050.00317.10
8.0.130.0060.00013.60
8.0.120.0000.00717.00
8.0.110.0040.00417.17
8.0.100.0080.00017.01
8.0.90.0040.00416.98
8.0.80.0070.00717.14
8.0.70.0000.00716.99
8.0.60.0040.00417.04
8.0.50.0000.00817.08
8.0.30.0060.01317.35
8.0.20.0060.01317.15
8.0.10.0000.01017.34
8.0.00.0100.00816.90
7.4.330.0050.00013.14
7.4.320.0040.00416.92
7.4.300.0030.00316.73
7.4.290.0030.00316.83
7.4.280.0000.00816.76
7.4.270.0030.00316.75
7.4.260.0030.00313.51
7.4.250.0030.00616.81
7.4.240.0040.00416.79
7.4.230.0070.00016.77
7.4.220.0110.00716.85
7.4.210.0070.00716.83
7.4.200.0000.00816.91
7.4.190.0040.00416.86
7.4.160.0080.00816.81
7.4.150.0180.00016.83
7.4.140.0180.01816.73
7.4.130.0100.00816.76
7.4.120.0130.01016.66
7.4.110.0070.01016.81
7.4.100.0110.00816.83
7.4.90.0110.00716.77
7.4.80.0060.01619.39
7.4.70.0070.01116.80
7.4.60.0080.01016.59
7.4.50.0000.00716.64
7.4.40.0080.00416.58
7.4.30.0110.00516.75
7.4.00.0070.01115.28
7.3.330.0000.00813.58
7.3.320.0000.00613.59
7.3.310.0030.00316.68
7.3.300.0040.00416.47
7.3.290.0050.00916.57
7.3.280.0080.00916.65
7.3.270.0120.00616.56
7.3.260.0070.01116.66
7.3.250.0120.00716.78
7.3.240.0140.00316.86
7.3.230.0090.00916.56
7.3.210.0030.01416.63
7.3.200.0100.01316.75
7.3.190.0140.00716.50
7.3.180.0120.00316.81
7.3.170.0120.00416.51
7.3.160.0150.00616.56
7.3.120.0100.00714.75
7.2.330.0110.00816.60
7.2.320.0120.01216.88
7.2.310.0100.01316.61
7.2.300.0100.00716.77
7.2.290.0070.01017.06
7.2.120.0090.00916.88
7.2.110.0090.00316.65
7.2.100.0090.00616.64
7.2.90.0090.00417.01
7.2.80.0120.00616.81
7.2.70.0080.01616.77
7.2.60.0110.00416.79
7.2.50.0030.01316.77
7.2.40.0110.00716.77
7.2.30.0600.00616.82
7.2.20.0120.00616.98
7.2.10.0140.00517.09
7.2.00.0080.00718.23
7.1.240.0140.00015.96
7.1.230.0090.00515.48
7.1.220.0100.00715.62
7.1.210.0080.01116.02
7.1.200.0150.00416.02
7.1.190.0170.00015.85
7.1.180.0000.01715.77
7.1.170.0120.00615.82
7.1.160.0060.00616.02
7.1.150.0140.00015.90
7.1.140.0100.00515.96
7.1.130.0060.00615.83
7.1.120.0130.00415.98
7.1.110.0070.01115.83
7.1.100.0080.00616.87
7.1.90.0060.01115.93
7.1.80.0090.00716.17
7.1.70.0110.00416.64
7.1.60.0100.00817.57
7.1.50.0120.00816.27
7.1.40.0070.00716.04
7.1.30.0120.00315.79
7.1.20.0090.00515.55
7.1.10.0120.00315.67
7.1.00.0110.03519.16
7.0.320.0120.00315.61
7.0.310.0140.00715.50
7.0.300.0140.00315.33
7.0.290.0110.00415.75
7.0.280.0060.01215.58
7.0.270.0060.01015.52
7.0.260.0140.00415.41
7.0.250.0130.00415.56
7.0.240.0070.01115.51
7.0.230.0090.00915.51
7.0.220.0140.00515.63
7.0.210.0140.00315.59
7.0.200.0170.00315.11
7.0.190.0160.00015.49
7.0.180.0120.00615.45
7.0.170.0080.00615.66
7.0.160.0160.00315.52
7.0.150.0130.00315.54
7.0.140.0070.04319.02
7.0.130.0090.00915.45
7.0.120.0070.02019.07
7.0.110.0160.00615.66
7.0.100.0200.00015.50
7.0.90.0090.00615.53
7.0.80.0130.00315.80
7.0.70.0130.00315.66
7.0.60.0000.02817.77
7.0.50.0120.04116.77
7.0.40.0080.04317.03
7.0.30.0200.04416.91
7.0.20.0150.02516.90
7.0.10.0130.02517.03
7.0.00.0040.02916.97
5.6.380.0120.00414.67
5.6.370.0170.00014.33
5.6.360.0090.00914.73
5.6.350.0140.01014.53
5.6.340.0100.00714.34
5.6.330.0070.01013.97
5.6.320.0050.00914.04
5.6.310.0040.01514.70
5.6.300.0130.00314.57
5.6.290.0040.01214.58
5.6.280.0050.04417.78
5.6.270.0110.00614.32
5.6.260.0140.00814.34
5.6.250.0070.01014.50
5.6.240.0080.01214.34
5.6.230.0130.00314.46
5.6.220.0120.00414.55
5.6.210.0130.02917.68
5.6.200.0090.03216.32
5.6.190.0130.03617.63
5.6.180.0180.03417.52
5.6.170.0180.02117.48
5.6.160.0190.02317.55
5.6.150.0110.04316.38
5.6.140.0130.04116.44
5.6.130.0070.04716.37
5.6.120.0050.03417.70
5.6.110.0100.02117.85
5.6.100.0100.03317.71
5.6.90.0130.03817.77
5.6.80.0080.04417.36
5.6.70.2130.02217.43
5.6.60.0070.00714.16
5.6.50.0080.01114.22
5.6.40.0150.00314.39
5.6.30.0110.00414.29
5.6.20.0090.00914.39
5.6.10.0150.00314.56
5.6.00.0070.01114.19
5.5.380.0140.00311.27
5.5.370.0110.00610.96
5.5.360.0040.00911.15
5.5.350.0190.03815.89
5.5.340.0100.02814.83
5.5.330.0090.02315.74
5.5.320.0140.02215.95
5.5.310.0230.04016.01
5.5.300.0100.02014.64
5.5.290.0030.04614.71
5.5.280.0050.03516.00
5.5.270.0080.02116.04
5.5.260.0090.04216.19
5.5.250.0090.04415.98
5.5.240.0080.04215.80
5.5.230.0080.00811.26
5.5.220.0080.00611.42
5.5.210.0140.00311.31
5.5.200.0080.00511.29
5.5.190.0070.00711.13
5.5.180.0070.00411.30
5.5.170.0000.01514.32
5.5.160.0110.00411.18
5.5.150.0060.00611.47
5.5.140.0120.00311.06
5.5.130.0130.00011.08
5.5.120.0040.01411.29
5.5.110.0060.00311.09
5.5.100.0040.01111.20
5.5.90.0110.00411.10
5.5.80.0070.00711.20
5.5.70.0040.00711.17
5.5.60.0130.00011.21
5.5.50.0030.01011.18
5.5.40.0080.00611.18
5.5.30.0080.00411.25
5.5.20.0050.01111.34
5.5.10.0090.00611.26
5.5.00.0090.00011.19
5.4.450.0100.04315.59
5.4.440.0110.04215.45
5.4.430.0140.02015.50
5.4.420.0030.02815.21
5.4.410.0090.03015.35
5.4.400.0050.02715.27
5.4.390.0030.03015.21
5.4.380.0160.03315.10
5.4.370.0120.02515.14
5.4.360.0100.02715.08
5.4.350.0100.03915.21
5.4.340.0110.03115.14
5.4.330.0070.00411.23
5.4.320.0050.02715.15
5.4.310.0070.03715.12
5.4.300.0060.03615.10
5.4.290.0150.03515.14
5.4.280.0080.04115.16
5.4.270.0080.02515.17
5.4.260.0130.03815.30
5.4.250.0060.02915.02
5.4.240.0090.02215.14
5.4.230.0050.02315.05
5.4.220.0130.03815.19
5.4.210.0110.03715.37
5.4.200.0070.04015.31
5.4.190.0100.03815.02
5.4.180.0070.02015.25
5.4.170.0050.03415.30
5.4.160.0090.02715.08
5.4.150.0070.04215.25
5.4.140.0040.03413.91
5.4.130.0080.02013.83
5.4.120.0080.03314.02
5.4.110.0090.03913.85
5.4.100.0120.02113.89
5.4.90.0040.02813.97
5.4.80.0130.01813.93
5.4.70.0130.03613.90
5.4.60.0070.02513.91
5.4.50.0060.02013.75
5.4.40.0090.03313.91
5.4.30.0050.03013.78
5.4.20.0090.03813.89
5.4.10.0090.02313.88
5.4.00.0060.03413.52
5.3.290.0120.03612.83
5.3.280.0080.02012.71
5.3.270.0060.04112.68
5.3.260.0060.04312.72
5.3.250.0080.02612.61
5.3.240.0130.01812.64
5.3.230.0100.04012.67
5.3.220.0070.04212.56
5.3.210.0110.03712.62
5.3.200.0070.02912.48
5.3.190.0100.02512.66
5.3.180.0030.04312.68
5.3.170.0070.03912.64
5.3.160.0100.03912.67
5.3.150.0060.02412.71
5.3.140.0050.02812.59
5.3.130.0190.03012.69
5.3.120.0090.03512.65
5.3.110.0050.03312.65
5.3.100.0070.03912.40
5.3.90.0040.02912.43
5.3.80.0040.02512.28
5.3.70.0060.02212.37
5.3.60.0050.02212.44
5.3.50.0100.01612.30
5.3.40.0060.02012.23
5.3.30.0040.02512.38
5.3.20.0050.02012.19
5.3.10.0060.02412.12
5.3.00.0100.01712.12
5.2.170.0030.02010.35
5.2.160.0050.01810.45
5.2.150.0060.01610.51
5.2.140.0070.01710.50
5.2.130.0080.01310.39
5.2.120.0060.01310.46
5.2.110.0050.01810.35
5.2.100.0070.01510.46
5.2.90.0020.01910.36
5.2.80.0030.01910.35
5.2.70.0070.01710.41
5.2.60.0070.01510.25
5.2.50.0040.01610.24
5.2.40.0040.01710.38
5.2.30.0060.01710.32
5.2.20.0080.01210.13
5.2.10.0090.01210.14
5.2.00.0040.01910.09
5.1.60.0020.0169.67
5.1.50.0050.0139.73
5.1.40.0100.0189.82
5.1.30.0070.0119.86
5.1.20.0120.0109.69
5.1.10.0030.0169.83
5.1.00.0030.0139.67
5.0.50.0040.0129.67
5.0.40.0060.0099.67
5.0.30.0020.0179.67
5.0.20.0040.0129.67
5.0.10.0020.0139.67
5.0.00.0020.0179.67
4.4.90.0080.0079.67
4.4.80.0020.0109.67
4.4.70.0000.0109.67
4.4.60.0010.0119.67
4.4.50.0000.0119.67
4.4.40.0000.0169.67
4.4.30.0000.0149.67
4.4.20.0020.0099.67
4.4.10.0040.0109.67
4.4.00.0030.0139.67
4.3.110.0000.0149.67
4.3.100.0000.0119.67
4.3.90.0000.0129.67
4.3.80.0020.0149.67
4.3.70.0020.0109.67
4.3.60.0030.0089.67
4.3.50.0020.0109.67
4.3.40.0000.0149.67
4.3.30.0020.0109.67
4.3.20.0010.0109.67
4.3.10.0010.0089.67
4.3.00.0040.0079.67

preferences:
49.48 ms | 401 KiB | 5 Q