3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_array = array ( 'bla' => 'blub', 'foo' => 'bar', 'another_array' => array ( 'stack' => 'overflow', ), ); $xml = new SimpleXMLElement('<root/>'); array_walk_recursive($test_array, array ($xml, 'addChild')); print $xml->asXML();

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.40.0040.01118.82
8.3.30.0110.01119.12
8.3.20.0000.00720.20
8.3.10.0050.00323.90
8.3.00.0030.00519.51
8.2.170.0110.00422.96
8.2.160.0110.00320.60
8.2.150.0120.00324.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00421.11
8.2.110.0160.00022.53
8.2.100.0040.00718.47
8.2.90.0030.00719.42
8.2.80.0030.00517.97
8.2.70.0030.00517.86
8.2.60.0000.00818.29
8.2.50.0050.00318.07
8.2.40.0040.00420.01
8.2.30.0110.00118.65
8.2.20.0050.00318.43
8.2.10.0100.00317.96
8.2.00.0060.00617.86
8.1.270.0080.00024.09
8.1.260.0040.00426.35
8.1.250.0100.00328.09
8.1.240.0060.00322.25
8.1.230.0040.00719.40
8.1.220.0040.00418.02
8.1.210.0000.00818.77
8.1.200.0030.00717.47
8.1.190.0000.00817.48
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0080.00519.13
8.1.150.0090.00518.14
8.1.140.0090.00517.61
8.1.130.0080.00417.73
8.1.120.0090.00417.64
8.1.110.0060.00717.68
8.1.100.0090.00417.66
8.1.90.0060.00517.69
8.1.80.0100.00317.67
8.1.70.0120.00117.64
8.1.60.0110.00417.73
8.1.50.0050.00917.67
8.1.40.0120.00217.71
8.1.30.0070.00517.80
8.1.20.0140.00517.79
8.1.10.0120.00517.76
8.1.00.0130.00417.67
8.0.300.0040.00418.77
8.0.290.0000.00717.13
8.0.280.0070.00617.73
8.0.270.0070.00617.29
8.0.260.0110.00217.32
8.0.250.0100.00217.23
8.0.240.0070.00517.29
8.0.230.0080.00517.25
8.0.220.0090.00317.21
8.0.210.0080.00417.23
8.0.200.0070.00517.22
8.0.190.0100.00317.25
8.0.180.0080.00517.21
8.0.170.0080.00517.18
8.0.160.0090.00717.17
8.0.150.0100.00517.09
8.0.140.0100.00517.09
8.0.130.0090.00516.51
8.0.120.0090.00617.13
8.0.110.0110.00417.16
8.0.100.0080.00417.08
8.0.90.0080.00417.10
8.0.80.0070.00617.11
8.0.70.0060.00517.13
8.0.60.0080.00517.14
8.0.50.0090.00417.06
8.0.30.0130.00717.16
8.0.20.0120.00917.20
8.0.10.0130.00617.21
8.0.00.0110.00717.21
7.4.330.0090.00116.19
7.4.320.0110.00216.92
7.4.300.0080.00517.01
7.4.290.0100.00316.96
7.4.280.0150.00416.87
7.4.270.0080.00716.87
7.4.260.0110.00416.86
7.4.250.0110.00716.86
7.4.240.0110.00316.80
7.4.230.0090.00516.81
7.4.220.0090.00416.87
7.4.210.0090.00616.86
7.4.200.0090.00516.86
7.4.190.0110.00416.93
7.4.180.0100.00516.87
7.4.160.0130.00616.78
7.4.150.0140.00616.85
7.4.140.0120.00616.91
7.4.130.0140.00416.73
7.4.120.0120.00616.69
7.4.110.0110.00816.72
7.4.100.0130.00416.76
7.4.90.0140.00416.66
7.4.80.0120.00716.94
7.4.70.0130.00616.71
7.4.60.0130.00616.72
7.4.50.0120.00516.66
7.4.40.0110.00616.66
7.4.30.0130.00616.72
7.4.20.0130.00516.75
7.4.10.0120.00716.73
7.4.00.0120.00616.48
7.3.330.0110.00516.12
7.3.320.0110.00416.05
7.3.310.0140.00216.63
7.3.300.0120.00216.61
7.3.290.0110.00416.57
7.3.280.0130.00416.53
7.3.270.0130.00616.63
7.3.260.0130.00516.58
7.3.250.0130.00616.54
7.3.240.0130.00616.56
7.3.230.0130.00616.56
7.3.220.0140.00516.52
7.3.210.0140.00516.52
7.3.200.0130.00716.72
7.3.190.0140.00516.52
7.3.180.0120.00716.54
7.3.170.0140.00416.53
7.3.160.0120.00616.51
7.3.150.0140.00516.51
7.3.140.0150.00516.48
7.3.130.0140.00616.51
7.3.120.0120.00716.33
7.3.110.0120.00716.29
7.3.100.0140.00516.32
7.3.90.0140.00416.57
7.3.80.0140.00716.40
7.3.70.0130.00516.41
7.3.60.0130.00516.39
7.3.50.0130.00616.48
7.3.40.0150.00516.50
7.3.30.0130.00616.45
7.3.20.0180.00616.72
7.3.10.0150.00516.78
7.3.00.0150.00516.71
7.2.340.0160.00516.62
7.2.330.0120.00816.58
7.2.320.0130.00716.67
7.2.310.0150.00616.66
7.2.300.0120.00716.65
7.2.290.0140.00516.63
7.2.280.0140.00616.63
7.2.270.0140.00716.61
7.2.260.0140.00616.66
7.2.250.0130.00616.47
7.2.240.0140.00616.51
7.2.230.0120.00716.47
7.2.220.0130.00616.48
7.2.210.0130.00716.52
7.2.200.0160.00316.56
7.2.190.0120.00716.58
7.2.180.0130.00516.59
7.2.170.0120.00716.67
7.2.160.0130.00516.64
7.2.150.0150.00716.98
7.2.140.0200.00717.03
7.2.130.0120.00817.14
7.2.120.0140.00417.05
7.2.110.0280.00417.11
7.2.100.0420.00717.04
7.2.90.0260.00817.02
7.2.80.0380.00616.74
7.2.70.0350.00716.76
7.2.60.0200.00716.75
7.2.50.0140.00816.75
7.2.40.0220.00516.76
7.2.30.0220.00716.77
7.2.20.0170.00516.80
7.2.10.0170.00616.76
7.2.00.0160.00716.79
7.1.330.0130.00616.15
7.1.320.0130.00616.17
7.1.310.0110.00716.15
7.1.300.0140.00616.18
7.1.290.0140.00816.12
7.1.280.0140.00416.14
7.1.270.0130.00516.14
7.1.260.0120.00616.15
7.1.250.0130.00615.90
7.1.240.0160.00515.93
7.1.230.0680.00615.96
7.1.220.0460.00716.00
7.1.210.0340.00915.97
7.1.200.0300.00715.97
7.1.190.0180.00615.68
7.1.180.0160.00515.63
7.1.170.0190.00615.63
7.1.160.0160.00715.63
7.1.150.0230.00415.66
7.1.140.0250.00715.68
7.1.130.0180.00615.64
7.1.120.0250.00715.65
7.1.110.0270.00615.65
7.1.100.0260.00815.63
7.1.90.0350.00715.62
7.1.80.0160.00715.63
7.1.70.0150.00615.56
7.1.60.0200.00718.07
7.1.50.0390.00518.09
7.1.40.0180.00618.04
7.1.30.0200.00918.03
7.1.20.0210.00718.02
7.1.10.0170.00715.59
7.1.00.0190.00815.59
7.0.330.0140.00515.73
7.0.320.0410.00715.71
7.0.310.0330.00515.39
7.0.300.0180.00615.38
7.0.290.0220.00715.41
7.0.280.0150.00615.72
7.0.270.0200.00515.37
7.0.260.0290.00515.42
7.0.250.0290.00615.47
7.0.240.0260.00715.50
7.0.230.0230.00615.44
7.0.220.0270.00815.40
7.0.210.0240.00615.37
7.0.200.0250.00615.40
7.0.190.0260.00515.44
7.0.180.0190.00615.45
7.0.170.0180.00715.45
7.0.160.0200.00515.45
7.0.150.0200.00615.39
7.0.140.0200.00615.39
7.0.130.0190.00715.47
7.0.120.0210.00515.47
7.0.110.0180.00715.42
7.0.100.0220.00515.44
7.0.90.0200.00615.34
7.0.80.0210.00415.38
7.0.70.0230.00615.41
7.0.60.0170.00715.42
7.0.50.0160.00715.39
7.0.40.0230.00615.49
7.0.30.0160.00715.39
7.0.20.0160.00615.39
7.0.10.0230.00715.38
7.0.00.0200.00715.37
5.6.400.0140.00516.16
5.6.390.0130.00616.15
5.6.380.0130.00816.01
5.6.370.0140.00516.03
5.6.360.0120.00716.00
5.6.350.0140.00616.03
5.6.340.0120.00716.01
5.6.330.0140.00715.95
5.6.320.0130.00715.99
5.6.310.0120.00715.95
5.6.300.0130.00615.68
5.6.290.0150.00515.80
5.6.280.0130.00715.78
5.6.270.0130.00715.74
5.6.260.0140.00715.74
5.6.250.0150.00615.71
5.6.240.0130.00815.76
5.6.230.0130.00615.78
5.6.220.0140.00815.76
5.6.210.0150.00515.73
5.6.200.0130.00615.82
5.6.190.0140.00715.84
5.6.180.0140.00615.77
5.6.170.0130.00715.88
5.6.160.0140.00715.86
5.6.150.0150.00515.81
5.6.140.0150.00615.83
5.6.130.0120.00715.78
5.6.120.0130.00715.78
5.6.110.0140.00715.77
5.6.100.0140.00615.78
5.6.90.0130.00815.76
5.6.80.0150.00615.74
5.6.70.0130.00715.83
5.6.60.0130.00515.77
5.6.50.0120.00715.74
5.6.40.0130.00615.71
5.6.30.0120.00815.74
5.6.20.0120.00615.71
5.6.10.0130.00715.74
5.6.00.0130.00715.67
5.5.380.0130.00715.14
5.5.370.0130.00615.10
5.5.360.0150.00514.98
5.5.350.0120.00615.00
5.5.340.0120.00714.98
5.5.330.0130.00615.00
5.5.320.0130.00614.95
5.5.310.0120.00615.00
5.5.300.0130.00614.96
5.5.290.0110.00715.04
5.5.280.0120.00615.01
5.5.270.0120.00714.98
5.5.260.0120.00614.95
5.5.250.0130.00615.11
5.5.240.0130.00615.05
5.5.230.0110.00715.00
5.5.220.0110.00615.02
5.5.210.0130.00515.08
5.5.200.0110.00814.95
5.5.190.0100.00714.96
5.5.180.0130.00414.93
5.5.170.0130.00515.59
5.5.160.0110.00714.94
5.5.150.0130.00514.93
5.5.140.0120.00614.87
5.5.130.0120.00614.85
5.5.120.0140.00614.84
5.5.110.0120.00714.82
5.5.100.0120.00715.03
5.5.90.0110.00715.00
5.5.80.0110.00615.00
5.5.70.0110.00614.98
5.5.60.0120.00515.00
5.5.50.0110.00715.00
5.5.40.0120.00615.03
5.5.30.0110.00715.03
5.5.20.0120.00514.98
5.5.10.0110.00714.98
5.5.00.0120.00514.94
5.4.450.0080.00612.94
5.4.440.0110.00512.92
5.4.430.0100.00412.93
5.4.420.0100.00512.91
5.4.410.0110.00412.90
5.4.400.0120.00412.87
5.4.390.0090.00612.88
5.4.380.0100.00512.90
5.4.370.0090.00612.93
5.4.360.0100.00512.85
5.4.350.0090.00612.95
5.4.340.0110.00312.90
5.4.330.0110.00413.16
5.4.320.0100.00612.87
5.4.310.0100.00412.92
5.4.300.0120.00212.97
5.4.290.0110.00412.93
5.4.280.0110.00612.89
5.4.270.0100.00512.90
5.4.260.0110.00412.89
5.4.250.0110.00412.91
5.4.240.0100.00512.88
5.4.230.0100.00512.77
5.4.220.0110.00412.77
5.4.210.0090.00512.80
5.4.200.0110.00412.76
5.4.190.0100.00412.73
5.4.180.0100.00512.76
5.4.170.0100.00412.79
5.4.160.0110.00412.75
5.4.150.0070.00712.82
5.4.140.0080.00612.87
5.4.130.0100.00512.90
5.4.120.0100.00412.85
5.4.110.0090.00612.98
5.4.100.0080.00712.95
5.4.90.0100.00512.96
5.4.80.0100.00512.98
5.4.70.0100.00512.99
5.4.60.0100.00512.99
5.4.50.0090.00612.96
5.4.40.0100.00513.00
5.4.30.0080.00612.98
5.4.20.0100.00512.99
5.4.10.0090.00513.01
5.4.00.0090.00412.82

preferences:
53.39 ms | 400 KiB | 5 Q