3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testArray = ['a' => ['b' => 'l'], 'c' => 'm', 'd' => ['n' => 'o']]; $actionArray = ['action' => ['b']]; function toUpperRecursive(array $arr) { foreach ($arr as $key => $val) { if (is_array($val)) { $newKey = strtoupper($key); $arr[$newKey] = toUpperRecursive($val); unset($arr[$key]); } elseif (is_string($val)) { // $arr[$key] = strtoupper($val); echo $val; } } return $arr; } echo "before:\n"; var_export($testArray); echo "after:\n"; var_export(toUpperRecursive($testArray));

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.0090.00618.43
8.3.50.0100.00718.14
8.3.40.0070.00718.71
8.3.30.0110.00418.81
8.3.20.0080.00021.76
8.3.10.0040.00421.85
8.3.00.0030.00619.81
8.2.180.0090.00918.29
8.2.170.0110.00722.96
8.2.160.0090.00619.43
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00420.99
8.2.110.0080.00322.08
8.2.100.0120.00017.97
8.2.90.0100.00020.07
8.2.80.0000.00817.97
8.2.70.0000.00818.03
8.2.60.0040.00418.03
8.2.50.0000.00818.10
8.2.40.0080.00022.38
8.2.30.0000.00719.42
8.2.20.0040.00418.11
8.2.10.0070.00018.12
8.2.00.0040.00417.99
8.1.280.0070.00725.92
8.1.270.0040.00424.00
8.1.260.0120.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00922.20
8.1.230.0040.00718.98
8.1.220.0060.00317.79
8.1.210.0080.00018.77
8.1.200.0060.00317.12
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0070.00018.80
8.1.150.0000.00718.92
8.1.140.0060.00318.91
8.1.130.0000.00919.00
8.1.120.0030.00817.35
8.1.110.0080.00017.38
8.1.100.0040.00417.34
8.1.90.0050.00317.52
8.1.80.0000.00817.34
8.1.70.0000.00717.41
8.1.60.0050.00317.58
8.1.50.0040.00417.51
8.1.40.0040.00417.41
8.1.30.0030.00617.54
8.1.20.0040.00417.57
8.1.10.0000.00717.55
8.1.00.0050.00317.39
8.0.300.0060.00319.71
8.0.290.0040.00416.75
8.0.280.0030.00518.38
8.0.270.0040.00416.80
8.0.260.0000.00617.16
8.0.250.0030.00316.86
8.0.240.0100.00017.01
8.0.230.0110.00016.95
8.0.220.0000.00716.78
8.0.210.0000.00716.75
8.0.200.0000.00616.97
8.0.190.0050.00316.86
8.0.180.0000.00816.80
8.0.170.0110.00016.94
8.0.160.0050.00316.81
8.0.150.0040.00416.79
8.0.140.0000.00716.81
8.0.130.0000.00513.31
8.0.120.0000.00816.86
8.0.110.0000.00716.88
8.0.100.0000.00716.77
8.0.90.0040.00416.84
8.0.80.0100.01016.86
8.0.70.0040.00416.72
8.0.60.0040.00416.76
8.0.50.0000.00816.76
8.0.30.0070.01116.92
8.0.20.0110.01017.40
8.0.10.0050.00316.79
8.0.00.0070.00916.88
7.4.330.0040.00015.55
7.4.320.0030.00316.45
7.4.300.0000.00616.51
7.4.290.0040.00416.64
7.4.280.0040.00416.59
7.4.270.0000.00716.59
7.4.260.0000.00716.55
7.4.250.0080.00016.49
7.4.240.0000.00716.65
7.4.230.0070.00016.70
7.4.220.0000.00716.41
7.4.210.0070.01116.50
7.4.200.0070.00016.71
7.4.160.0100.00916.40
7.4.140.0110.00917.86
7.4.130.0080.01116.44
7.4.120.0080.01016.53
7.4.110.0150.00316.54
7.4.100.0080.00816.35
7.4.90.0100.00616.38
7.4.80.0090.01619.39
7.4.70.0090.01216.45
7.4.60.0140.00716.42
7.4.50.0070.01016.55
7.4.40.0040.01216.71
7.4.10.0060.01314.76
7.4.00.0060.01014.84
7.3.330.0050.00013.34
7.3.320.0000.00613.20
7.3.310.0000.00716.46
7.3.300.0000.00716.23
7.3.290.0000.00716.38
7.3.280.0030.01316.34
7.3.260.0070.01116.48
7.3.240.0060.01116.54
7.3.230.0110.00916.61
7.3.210.0060.01216.50
7.3.200.0030.01416.37
7.3.190.0140.00316.65
7.3.180.0120.00316.64
7.3.170.0180.00316.38
7.3.160.0100.00716.64
7.3.130.0040.01114.64
7.3.120.0110.00414.88
7.3.110.0130.00614.70
7.3.100.0130.00314.93
7.3.90.0080.00414.92
7.3.80.0070.00714.85
7.3.70.0090.00314.83
7.3.60.0040.01114.96
7.3.50.0000.01814.60
7.3.40.0080.00414.93
7.3.30.0080.00814.62
7.3.20.0030.01016.59
7.3.10.0100.00516.38
7.3.00.0050.01116.24
7.2.330.0080.01016.68
7.2.320.0130.00716.68
7.2.310.0120.00416.74
7.2.300.0110.00616.72
7.2.290.0080.01416.53
7.2.260.0070.01014.96
7.2.250.0110.00715.24
7.2.240.0000.01615.27
7.2.230.0030.01215.11
7.2.220.0070.00715.23
7.2.210.0120.00314.95
7.2.200.0070.01015.15
7.2.190.0070.00314.90
7.2.180.0090.00615.05
7.2.170.0060.00615.14
7.2.160.0070.00714.89
7.2.150.0090.00616.96
7.2.140.0000.01516.80
7.2.130.0060.00816.53
7.2.120.0030.01416.45
7.2.110.0100.00616.63
7.2.100.0080.00416.66
7.2.90.0160.00516.83
7.2.80.0100.01216.59
7.2.70.0110.00916.64
7.2.60.0090.00516.94
7.2.50.0090.01016.82
7.2.40.0460.01217.22
7.2.30.0140.01117.28
7.2.20.0160.00816.93
7.2.10.0390.01217.13
7.2.00.0910.01517.15
7.1.330.0030.01015.98
7.1.320.0000.01315.96
7.1.310.0090.00615.80
7.1.300.0030.01315.94
7.1.290.0060.00615.76
7.1.280.0080.00415.87
7.1.270.0100.00715.60
7.1.260.0040.00715.83
7.1.250.0080.00315.30
7.1.240.0120.00415.73
7.1.230.0090.00015.89
7.1.220.0030.00715.72
7.1.210.0070.00715.93
7.1.200.0030.01315.63
7.1.190.0000.00815.78
7.1.180.0090.00615.97
7.1.170.0000.01615.88
7.1.160.0080.01116.09
7.1.150.0130.00716.23
7.1.140.0230.01516.20
7.1.130.1640.00416.38
7.1.120.0040.01216.40
7.1.110.0070.00915.83
7.1.100.0060.01015.98
7.1.90.2730.00915.88
7.1.80.2180.01115.83
7.1.70.1990.00915.31
7.1.60.2550.01224.29
7.1.50.2590.01024.50
7.1.40.3040.01424.20
7.1.30.3120.01424.34
7.1.20.3190.01224.20
7.1.10.2880.00915.24
7.1.00.1780.01115.43
7.0.330.0060.00615.26
7.0.320.0060.00615.44
7.0.310.0060.01215.47
7.0.300.0030.01415.13
7.0.290.0030.00915.64
7.0.280.0100.00315.60
7.0.270.0030.00915.26
7.0.260.0030.01015.39
7.0.250.0030.00715.32
7.0.240.0060.00615.57
7.0.230.0030.00715.23
7.0.220.0120.00415.41
7.0.210.0030.01315.29
7.0.200.0030.01215.49
7.0.190.0070.00415.38
7.0.180.0070.01015.37
7.0.170.0030.00615.54
7.0.160.0000.01315.26
7.0.150.0080.00415.66
7.0.140.0040.00815.30
7.0.130.0100.00315.50
7.0.120.0100.00315.57
7.0.110.0070.00715.63
7.0.100.0030.00915.59
7.0.90.0040.00815.18
7.0.80.0110.00415.35
7.0.70.0120.00415.14
7.0.60.0090.00615.32
7.0.50.0080.00015.53
7.0.40.0080.00313.52
7.0.30.0000.01513.52
7.0.20.0070.00713.52
7.0.10.0000.00813.52
7.0.00.0070.00713.52
5.6.400.0030.01014.40
5.6.390.0100.00314.69
5.6.380.0060.00313.99
5.6.370.0030.01214.64
5.6.360.0030.01014.46
5.6.350.0000.00814.50
5.6.340.0040.00814.22
5.6.330.0070.00714.66
5.6.320.0080.00414.32
5.6.310.0090.00614.58
5.6.300.0040.00814.30
5.6.290.0090.00014.27
5.6.280.0100.00014.45
5.6.270.0110.00314.15
5.6.260.0000.00814.59
5.6.250.0040.01214.68
5.6.240.0000.00914.29
5.6.230.0090.00614.44
5.6.220.0100.00714.34
5.6.210.0060.00914.55
5.6.200.0060.00314.48
5.6.190.0030.01014.67
5.6.180.0090.00614.32
5.6.170.0000.01614.27
5.6.160.0040.01114.19
5.6.150.0100.00314.51
5.6.140.0000.00914.49
5.6.130.0060.00614.33
5.6.120.0080.00614.30
5.6.110.0040.01214.73
5.6.100.0060.00314.27
5.6.90.0030.00614.24
5.6.80.0040.00814.58
5.6.70.0000.01514.45
5.6.60.0100.00014.43
5.6.50.0070.00414.30
5.6.40.0080.00413.93
5.6.30.0060.00314.38
5.6.20.0000.01114.22
5.6.10.0070.01014.42
5.6.00.0110.00314.34

preferences:
60.91 ms | 400 KiB | 5 Q