3v4l.org

run code in 300+ PHP versions simultaneously
<?php $config = array( 'test' => array( 'derp' => array( 'example' => true, 'test' => 'derp'), 'herpa' => 'derpa', 'perpa' => 'hurradur')); function flatten($array, $current_path='') { $result = array(); foreach($array as $key => $val) { $path = $current_path . '.' . $key; if (is_array($val)) { $result = array_merge($result, flatten($val, $path)); } else { $result[$path] = $val; } } return $result; } var_dump(flatten($config));

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.70.0110.00416.63
8.3.60.0120.00318.18
8.3.50.0120.00621.99
8.3.40.0110.00418.64
8.3.30.0090.00619.03
8.3.20.0040.00420.20
8.3.10.0000.00722.11
8.3.00.0050.00322.43
8.2.190.0130.00616.58
8.2.180.0040.01116.38
8.2.170.0120.00322.96
8.2.160.0100.00320.98
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0040.00419.11
8.2.110.0040.00422.14
8.2.100.0060.00617.84
8.2.90.0060.00319.21
8.2.80.0030.00618.04
8.2.70.0090.00017.75
8.2.60.0000.00918.05
8.2.50.0000.00818.07
8.2.40.0050.00318.28
8.2.30.0040.00418.12
8.2.20.0070.00017.71
8.2.10.0050.00317.62
8.2.00.0030.00517.68
8.1.280.0170.00325.92
8.1.270.0030.00623.71
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00623.83
8.1.230.0100.00019.15
8.1.220.0030.00617.79
8.1.210.0000.00818.77
8.1.200.0070.00317.50
8.1.190.0000.00817.41
8.1.180.0030.00618.10
8.1.170.0090.00018.55
8.1.160.0030.00622.12
8.1.150.0000.00718.67
8.1.140.0000.00717.49
8.1.130.0080.00017.73
8.1.120.0040.00417.54
8.1.110.0000.00717.45
8.1.100.0070.00017.47
8.1.90.0040.00417.42
8.1.80.0040.00317.46
8.1.70.0000.00717.48
8.1.60.0040.00417.47
8.1.50.0050.00217.44
8.1.40.0040.00417.46
8.1.30.0000.00917.50
8.1.20.0000.00817.54
8.1.10.0070.00017.50
8.1.00.0040.00417.48
8.0.300.0070.00018.77
8.0.290.0000.00717.30
8.0.280.0070.00018.38
8.0.270.0040.00417.19
8.0.260.0070.00016.82
8.0.250.0060.00016.89
8.0.240.0050.00316.84
8.0.230.0030.00316.90
8.0.220.0030.00316.89
8.0.210.0030.00316.80
8.0.200.0000.00616.88
8.0.190.0070.00316.91
8.0.180.0030.00316.91
8.0.170.0060.00316.83
8.0.160.0040.00416.80
8.0.150.0030.00716.87
8.0.140.0040.00416.85
8.0.130.0060.00013.25
8.0.120.0050.00216.71
8.0.110.0030.00616.91
8.0.100.0040.00416.83
8.0.90.0000.00716.88
8.0.80.0090.00816.84
8.0.70.0000.00716.76
8.0.60.0070.00016.91
8.0.50.0000.00716.70
8.0.30.0090.01117.25
8.0.20.0090.01117.40
8.0.10.0000.00816.96
8.0.00.0130.00516.71
7.4.330.0000.00515.18
7.4.320.0070.00016.52
7.4.300.0000.00616.60
7.4.290.0030.00316.61
7.4.280.0030.00316.51
7.4.270.0070.00016.50
7.4.260.0000.00816.41
7.4.250.0000.00716.39
7.4.240.0020.00516.50
7.4.230.0000.00716.62
7.4.220.0120.00616.54
7.4.210.0090.00816.60
7.4.200.0070.00016.48
7.4.190.0000.00716.69
7.4.160.0090.00616.54
7.4.150.0100.00717.40
7.4.140.0120.00917.86
7.4.130.0110.00916.53
7.4.120.0060.01416.39
7.4.110.0090.00816.52
7.4.100.0150.00916.48
7.4.90.0060.01216.63
7.4.80.0120.00919.39
7.4.70.0100.00616.65
7.4.60.0160.00016.56
7.4.50.0050.00416.34
7.4.40.0150.00022.77
7.4.30.0120.00416.66
7.4.10.0070.00715.16
7.4.00.0030.01114.78
7.3.330.0050.00013.43
7.3.320.0030.00313.39
7.3.310.0030.00316.34
7.3.300.0000.00616.26
7.3.290.0060.01416.39
7.3.280.0090.00816.41
7.3.270.0090.00917.40
7.3.260.0120.01216.53
7.3.250.0100.00716.53
7.3.240.0140.00716.51
7.3.230.0030.01416.66
7.3.210.0100.01316.68
7.3.200.0070.01019.39
7.3.190.0140.00716.30
7.3.180.0070.01416.68
7.3.170.0120.00916.74
7.3.160.0120.00916.36
7.3.130.0110.00715.11
7.3.120.0070.01015.03
7.3.110.0030.01614.57
7.3.100.0040.01114.81
7.3.90.0100.00714.78
7.3.80.0000.01214.92
7.3.70.0060.00614.70
7.3.60.0100.00314.91
7.3.50.0080.00815.01
7.3.40.0100.00614.73
7.3.30.0080.00814.80
7.3.20.0070.00716.56
7.3.10.0060.00916.87
7.3.00.0080.00516.53
7.2.330.0120.00616.59
7.2.320.0100.01416.76
7.2.310.0060.01616.77
7.2.300.0070.01016.63
7.2.290.0040.01116.51
7.2.260.0090.00914.84
7.2.250.0100.01014.96
7.2.240.0000.01514.93
7.2.230.0060.01115.22
7.2.220.0040.01115.07
7.2.210.0000.01515.05
7.2.200.0040.01214.72
7.2.190.0110.00414.75
7.2.180.0040.01115.04
7.2.170.0060.00914.69
7.2.160.0090.00615.07
7.2.150.0030.01216.87
7.2.140.0000.01216.68
7.2.130.0030.01016.88
7.2.120.0020.01216.91
7.2.110.0030.00816.91
7.2.100.0070.00316.99
7.2.90.0070.00616.82
7.2.80.0080.00316.91
7.2.70.0080.00516.80
7.2.60.0080.00816.84
7.2.50.0050.00916.84
7.2.40.0070.00716.86
7.2.30.0090.00616.96
7.2.20.0060.00816.88
7.2.10.0060.01016.80
7.2.00.0110.00416.98
7.1.330.0000.01715.90
7.1.320.0060.01315.58
7.1.310.0100.00315.78
7.1.300.0070.00315.78
7.1.290.0060.01015.90
7.1.280.0100.00315.76
7.1.270.0130.00315.53
7.1.260.0000.01415.54
7.1.250.0050.00815.94
7.1.240.0090.00415.86
7.1.230.0030.00915.83
7.1.220.0070.00715.70
7.1.210.0060.00615.55
7.1.200.0100.00515.77
7.1.190.0050.00615.87
7.1.180.0060.00715.90
7.1.170.0050.00815.65
7.1.160.0080.00415.58
7.1.150.0040.00715.91
7.1.140.0060.00615.71
7.1.130.0030.01015.68
7.1.120.0020.01115.69
7.1.110.0080.00815.85
7.1.100.0090.00415.92
7.1.90.0020.01215.84
7.1.80.0040.00915.86
7.1.70.0070.00816.40
7.1.60.0070.01017.22
7.1.50.0070.00816.10
7.1.40.0100.00515.77
7.1.30.0050.00715.74
7.1.20.0030.01215.66
7.1.10.0070.00915.62
7.1.00.0050.03018.01
7.0.330.0060.00615.40
7.0.320.0060.00915.49
7.0.310.0050.00915.25
7.0.300.0020.01015.25
7.0.290.0050.00715.21
7.0.280.0030.01015.18
7.0.270.0030.01015.51
7.0.260.0080.00815.20
7.0.250.0100.00515.54
7.0.240.0030.00815.35
7.0.230.0050.00715.28
7.0.220.0040.00815.38
7.0.210.0080.00615.15
7.0.200.0030.00915.74
7.0.190.0050.00715.50
7.0.180.0050.00615.47
7.0.170.0030.00915.42
7.0.160.0040.00815.52
7.0.150.0040.00815.47
7.0.140.0050.02517.63
7.0.130.0070.00415.27
7.0.120.0060.00615.60
7.0.110.0070.00515.26
7.0.100.0020.01015.29
7.0.90.0030.01015.23
7.0.80.0080.00615.46
7.0.70.0060.00915.24
7.0.60.0080.01816.94
7.0.50.0060.03216.12
7.0.40.0060.03115.93
7.0.30.0230.02715.80
7.0.20.0160.02215.79
7.0.10.0170.01315.91
7.0.00.0060.02115.81
5.6.400.0000.01314.23
5.6.390.0060.00614.35
5.6.380.0030.00914.31
5.6.370.0010.01314.49
5.6.360.0080.00514.33
5.6.350.0080.00614.61
5.6.340.0060.00614.25
5.6.330.0070.00514.46
5.6.320.0040.00914.46
5.6.310.0000.01314.35
5.6.300.0060.00714.32
5.6.290.0060.00614.21
5.6.280.0050.02916.55
5.6.270.0040.00914.43
5.6.260.0090.00714.47
5.6.250.0050.00914.34
5.6.240.0080.00514.14
5.6.230.0070.00614.39
5.6.220.0000.01314.25
5.6.210.0090.01716.27
5.6.200.0070.03115.77
5.6.190.0070.02816.56
5.6.180.1220.02216.35
5.6.170.0080.01916.41
5.6.160.0110.02716.40
5.6.150.0080.02715.63
5.6.140.0070.01515.63
5.6.130.0020.02015.75
5.6.120.0080.03016.52
5.6.110.0090.03016.59
5.6.100.0080.02916.52
5.6.90.0030.02416.47
5.6.80.0100.02316.24
5.6.70.0070.00614.31
5.6.60.0060.00614.52
5.6.50.0060.00614.22
5.6.40.0080.00314.43
5.6.30.0070.00714.20
5.6.20.0070.00814.08
5.6.10.0040.00914.21
5.6.00.0070.00514.38
5.5.380.0060.00712.88
5.5.370.0040.00912.65
5.5.360.0030.00812.63
5.5.350.0060.02915.28
5.5.340.0050.01814.32
5.5.330.0040.02515.24
5.5.320.0030.01715.22
5.5.310.0170.02615.34
5.5.300.0060.02814.45
5.5.290.0020.01914.59
5.5.280.0020.03115.60
5.5.270.0110.02515.43
5.5.260.0050.02715.48
5.5.250.0040.01815.34
5.5.240.0080.02315.20
5.5.230.0060.00712.83
5.5.220.0030.00712.76
5.5.210.0080.00412.68
5.5.200.0050.00712.68
5.5.190.0080.00312.75
5.5.180.0070.00612.65
5.5.170.0030.00712.74
5.5.160.0060.00412.72
5.5.150.0080.00312.68
5.5.140.0030.00712.67
5.5.130.0000.01112.48
5.5.120.0060.00612.71
5.5.110.0040.00912.75
5.5.100.0060.00512.49
5.5.90.0070.00512.63
5.5.80.0050.00612.75
5.5.70.0060.00412.64
5.5.60.0030.01012.59
5.5.50.0050.00612.62
5.5.40.0070.00712.79
5.5.30.0070.00312.56
5.5.20.0090.00312.69
5.5.10.0100.00212.83
5.5.00.0050.00612.72
5.4.450.0260.02614.98
5.4.440.0220.02814.80
5.4.430.0110.02414.84
5.4.420.0070.02114.92
5.4.410.0040.02614.75
5.4.400.0140.01914.59
5.4.390.0090.01814.65
5.4.380.0110.02014.54
5.4.370.0030.01814.56
5.4.360.0080.01914.66
5.4.350.0090.01712.42
5.4.340.0040.02112.42
5.4.330.0030.00612.72
5.4.320.0050.01512.63
5.4.310.0030.02012.43
5.4.300.0030.01812.57
5.4.290.0050.01712.53
5.4.280.0030.01612.49
5.4.270.0030.01712.46
5.4.260.0030.01912.48
5.4.250.0060.01512.52
5.4.240.0040.01512.48
5.4.230.0030.01912.54
5.4.220.0030.01812.49
5.4.210.0050.01512.46
5.4.200.0050.01512.44
5.4.190.0040.01512.49
5.4.180.0050.01712.57
5.4.170.0030.02012.43
5.4.160.0030.01812.43
5.4.150.0070.01512.51
5.4.140.0060.01912.29
5.4.130.0070.01512.44
5.4.120.0070.01612.31
5.4.110.0050.01712.27
5.4.100.0090.01812.32
5.4.90.0040.01812.36
5.4.80.0050.01512.38
5.4.70.0040.01712.31
5.4.60.0060.01412.40
5.4.50.0040.01812.39
5.4.40.0080.01512.34
5.4.30.0040.01512.27
5.4.20.0050.01512.43
5.4.10.0040.01612.33
5.4.00.0070.01412.21
5.3.290.0050.01812.53
5.3.280.0050.01612.46
5.3.270.0020.01812.43
5.3.260.0030.01912.48
5.3.250.0030.01912.53
5.3.240.0050.01612.42
5.3.230.0070.01612.40
5.3.220.0060.01612.44
5.3.210.0050.01912.45
5.3.200.0040.01612.37
5.3.190.0080.01312.38
5.3.180.0070.01512.37
5.3.170.0050.01912.46
5.3.160.0040.01712.41
5.3.150.0050.01612.45
5.3.140.0020.01712.47
5.3.130.0020.01712.47
5.3.120.0040.01612.37
5.3.110.0030.01912.40
5.3.100.0030.01912.33
5.3.90.0060.01412.19
5.3.80.0050.01712.23
5.3.70.0000.01812.13
5.3.60.0030.01712.14
5.3.50.0040.01712.22
5.3.40.0060.01512.24
5.3.30.0050.01512.16
5.3.20.0030.01612.08
5.3.10.0030.01412.04
5.3.00.0030.01812.08
5.2.170.0040.0169.72
5.2.160.0030.0239.72
5.2.150.0020.0199.72
5.2.140.0050.0189.72
5.2.130.0040.0169.70
5.2.120.0040.0179.70
5.2.110.0060.0199.70
5.2.100.0020.0199.71
5.2.90.0040.0199.70
5.2.80.0050.0159.70
5.2.70.0020.0189.70
5.2.60.0030.0189.67
5.2.50.0060.0149.66
5.2.40.0040.0199.65
5.2.30.0020.0209.63
5.2.20.0020.0179.63
5.2.10.0030.0169.59
5.2.00.0060.0169.51
5.1.60.0030.0199.15
5.1.50.0030.0149.15
5.1.40.0030.0149.15
5.1.30.0030.0179.32
5.1.20.0020.0189.33
5.1.10.0050.0139.20
5.1.00.0040.0149.19
5.0.50.0010.0148.43
5.0.40.0030.0118.36
5.0.30.0020.0198.27
5.0.20.0040.0108.26
5.0.10.0050.0098.24
5.0.00.0020.0178.24
4.4.90.0010.0107.52
4.4.80.0030.0097.51
4.4.70.0010.0107.51
4.4.60.0010.0127.50
4.4.50.0020.0097.51
4.4.40.0000.0177.48
4.4.30.0010.0127.51
4.4.20.0010.0137.55
4.4.10.0020.0107.55
4.4.00.0020.0137.51
4.3.110.0010.0107.46
4.3.100.0030.0117.46
4.3.90.0040.0097.44
4.3.80.0030.0137.42
4.3.70.0020.0097.44
4.3.60.0010.0117.44
4.3.50.0030.0117.44
4.3.40.0020.0147.39
4.3.30.0020.0106.77
4.3.20.0010.0106.77
4.3.10.0000.0106.74
4.3.00.0000.0148.80

preferences:
47.68 ms | 401 KiB | 5 Q