3v4l.org

run code in 300+ PHP versions simultaneously
(<?php $custom_fields = [ 'foo' => '17', ]; $time_intervals = ['day', 'month', 'year', 'hour', 'minute', 'period']; $data = [ 'fooday' => '17', 'foomonth' => 'March', 'name' => 'Chris' ]; var_dump(array_map(function ($field, $interval) { return $field . $interval; }, array_keys($custom_fields), $time_intervals)); foreach (array_keys($custom_fields) as $name) { foreach ($time_intervals as $interval_name) { // ; } } var_dump($data); // Result should be array that only contains $data['name'] = 'Chris'

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.00418.27
8.3.50.0150.00622.73
8.3.40.0040.01118.85
8.3.30.0030.01018.79
8.3.20.0040.00420.33
8.3.10.0080.00023.65
8.3.00.0050.00317.38
8.2.180.0120.00618.18
8.2.170.0070.00722.96
8.2.160.0110.00420.22
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0100.01026.16
8.2.120.0080.00021.00
8.2.110.0040.00422.14
8.2.100.0080.00317.72
8.2.90.0080.00019.05
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0000.00917.93
8.2.50.0040.00418.07
8.2.40.0030.00518.09
8.2.30.0070.00018.15
8.2.20.0040.00417.55
8.2.10.0040.00418.05
8.2.00.0040.00417.80
8.1.280.0060.00925.92
8.1.270.0050.00523.71
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00023.77
8.1.230.0060.00619.16
8.1.220.0030.00617.76
8.1.210.0060.00318.77
8.1.200.0050.00517.35
8.1.190.0030.00517.00
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0000.00822.02
8.1.150.0030.00518.86
8.1.140.0040.00417.51
8.1.130.0030.00317.76
8.1.120.0000.00717.50
8.1.110.0080.00017.35
8.1.100.0030.00617.46
8.1.90.0060.00317.49
8.1.80.0050.00317.34
8.1.70.0070.00017.33
8.1.60.0030.00617.59
8.1.50.0030.00617.52
8.1.40.0040.00417.52
8.1.30.0030.00617.69
8.1.20.0000.00817.71
8.1.10.0040.00417.49
8.1.00.0040.00417.33
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00318.34
8.0.270.0040.00417.20
8.0.260.0030.00317.25
8.0.250.0070.00016.86
8.0.240.0070.00016.91
8.0.230.0000.00716.90
8.0.220.0040.00416.90
8.0.210.0030.00316.85
8.0.200.0000.00616.78
8.0.190.0040.00416.91
8.0.180.0000.00716.79
8.0.170.0030.00616.96
8.0.160.0040.00416.84
8.0.150.0030.00516.84
8.0.140.0040.00316.82
8.0.130.0060.00013.34
8.0.120.0050.00316.87
8.0.110.0070.00016.89
8.0.100.0000.00716.83
8.0.90.0070.00016.89
8.0.80.0030.01316.83
8.0.70.0040.00416.78
8.0.60.0000.00816.91
8.0.50.0060.00316.79
8.0.30.0140.00916.95
8.0.20.0070.01217.40
8.0.10.0080.00016.82
8.0.00.0080.01016.79
7.4.330.0050.00015.03
7.4.320.0060.00016.58
7.4.300.0060.00016.46
7.4.290.0040.00416.59
7.4.280.0030.00616.58
7.4.270.0040.00416.49
7.4.260.0070.00016.38
7.4.250.0000.00816.46
7.4.240.0060.00216.54
7.4.230.0030.00316.42
7.4.220.0100.01016.69
7.4.210.0000.01516.46
7.4.200.0040.00416.42
7.4.160.0060.01216.62
7.4.150.0070.01017.40
7.4.140.0140.00917.86
7.4.130.0070.01016.42
7.4.120.0140.00416.40
7.4.110.0120.00616.46
7.4.100.0080.01216.41
7.4.90.0120.00616.55
7.4.80.0100.01019.39
7.4.70.0060.01216.36
7.4.60.0130.00316.54
7.4.50.0090.00016.21
7.4.40.0110.00816.38
7.4.30.0130.00316.36
7.4.00.0100.00315.02
7.3.330.0000.00513.32
7.3.320.0030.00313.09
7.3.310.0030.00316.19
7.3.300.0030.00316.17
7.3.290.0060.01316.21
7.3.280.0100.00616.28
7.3.270.0130.01017.40
7.3.260.0060.01316.37
7.3.250.0060.01616.34
7.3.240.0200.00416.34
7.3.230.0120.00616.68
7.3.210.0040.01416.63
7.3.200.0090.01116.58
7.3.190.0100.00716.28
7.3.180.0060.01316.23
7.3.170.0110.00516.32
7.3.160.0110.01116.36
7.2.330.0070.01116.45
7.2.320.0100.01016.72
7.2.310.0060.01216.59
7.2.300.0030.01316.72
7.2.290.0110.00616.53
7.2.00.0030.00919.18
7.1.200.0100.00015.66
7.1.100.0040.00818.10
7.1.70.0070.00717.30
7.1.60.0080.01219.40
7.1.50.0110.01416.75
7.1.00.0030.07322.42
7.0.200.0070.00416.68
7.0.140.0100.06321.95
7.0.60.0100.04019.82
7.0.50.0070.08317.87
7.0.40.0100.06720.23
7.0.30.0500.07720.23
7.0.20.0430.03320.07
7.0.10.0100.04020.07
7.0.00.0100.04320.14
5.6.280.0030.07321.13
5.6.210.0100.07020.66
5.6.200.0100.07718.18
5.6.190.0170.04320.57
5.6.180.0170.05020.48
5.6.170.0370.07020.54
5.6.160.0070.06720.76
5.6.150.0100.08718.18
5.6.140.0100.08018.28
5.6.130.0070.07718.18
5.6.120.0030.04321.00
5.6.110.0030.07320.89
5.6.100.0130.07721.09
5.6.90.0100.07320.95
5.6.80.0200.06720.29
5.6.70.2670.03020.48
5.5.350.0170.07320.33
5.5.340.0100.06317.92
5.5.330.0030.09020.25
5.5.320.0170.04320.30
5.5.310.0300.07720.21
5.5.300.0070.08317.94
5.5.290.0030.04018.09
5.5.280.0100.08720.97
5.5.270.0100.06720.68
5.5.260.0070.08720.64
5.5.250.0100.08720.59
5.5.240.0270.08020.24
5.4.450.0130.04019.42
5.4.440.0270.07319.18
5.4.430.0170.06319.45
5.4.420.0230.06719.41
5.4.410.0400.04019.14
5.4.400.0300.06319.25
5.4.390.0400.05719.26
5.4.380.0270.04319.22
5.4.370.0330.08019.25
5.4.360.0330.06318.88
5.4.350.0200.08019.16
5.4.340.0130.04319.13
5.4.320.0170.04719.06
5.4.310.0300.06319.20
5.4.300.0200.07319.22
5.4.290.0170.04719.23
5.4.280.0100.04318.85
5.4.270.0130.04018.98
5.4.260.0230.03019.09
5.4.250.0170.05019.30
5.4.240.0200.05319.20
5.4.230.0300.04018.98
5.4.220.0300.06719.09
5.4.210.0230.06719.07
5.4.200.0200.03719.07
5.4.190.0270.03318.97
5.4.180.0230.04318.96
5.4.170.0200.06318.93
5.4.160.0230.06019.21
5.4.150.0270.03019.09
5.4.140.0030.05316.36
5.4.130.0300.06316.53
5.4.120.0100.06016.51
5.4.110.0170.05716.45
5.4.100.0270.04016.58
5.4.90.0200.06016.28
5.4.80.0300.06016.54
5.4.70.0270.06716.38
5.4.60.0200.05716.53
5.4.50.0230.03316.42
5.4.40.0130.05316.16
5.4.30.0100.04316.34
5.4.20.0170.06716.55
5.4.10.0230.04716.25
5.4.00.0130.04715.73
5.3.290.0170.08014.66
5.3.280.0270.06714.48
5.3.270.0130.04714.47
5.3.260.0270.07314.46
5.3.250.0170.04014.46
5.3.240.0200.03714.55
5.3.230.0270.06314.53
5.3.220.0230.07314.52
5.3.210.0200.05714.46
5.3.200.0100.04314.55
5.3.190.0230.04014.52
5.3.180.0300.02714.52
5.3.170.0270.07014.55
5.3.160.0200.05714.46
5.3.150.0270.03714.46
5.3.140.0130.08014.50
5.3.130.0170.07314.46
5.3.120.0230.06714.50
5.3.110.0200.05314.46
5.3.100.0200.05014.46
5.3.90.0230.05314.46
5.3.80.0170.03714.46
5.3.70.0130.03714.46
5.3.60.0170.07014.46
5.3.50.0270.04014.46
5.3.40.0270.06714.46
5.3.30.0230.04314.46
5.3.20.0230.05714.46
5.3.10.0270.06014.46
5.3.00.0270.06314.46
5.2.170.0200.05714.46
5.2.160.0170.03314.46
5.2.150.0170.06014.46
5.2.140.0170.06014.46
5.2.130.0230.02714.46
5.2.120.0270.03014.46
5.2.110.0230.05714.46
5.2.100.0200.03014.46
5.2.90.0200.03714.46
5.2.80.0200.06014.46
5.2.70.0230.04314.46
5.2.60.0130.03014.46
5.2.50.0070.04014.46
5.2.40.0130.06314.46
5.2.30.0200.03314.46
5.2.20.0070.04014.46
5.2.10.0170.06014.46
5.2.00.0170.04714.46
5.1.60.0130.04014.46
5.1.50.0170.03714.46
5.1.40.0130.05014.46
5.1.30.0230.02714.46
5.1.20.0130.04714.46
5.1.10.0100.02714.46
5.1.00.0130.04714.46
5.0.50.0100.03314.46
5.0.40.0130.03014.46
5.0.30.0130.05714.46
5.0.20.0070.04314.46
5.0.10.0070.04014.46
5.0.00.0100.06014.46
4.4.90.0030.02014.46
4.4.80.0100.03314.46
4.4.70.0100.02314.46
4.4.60.0130.03314.46
4.4.50.0100.03314.46
4.4.40.0070.04314.46
4.4.30.0170.02714.46
4.4.20.0030.01714.46
4.4.10.0100.03314.46
4.4.00.0130.05014.46
4.3.110.0070.03714.46
4.3.100.0070.03714.46
4.3.90.0030.02014.46
4.3.80.0070.05714.46
4.3.70.0030.03014.46
4.3.60.0070.02014.46
4.3.50.0100.02714.46
4.3.40.0030.04714.46
4.3.30.0000.03014.46
4.3.20.0030.02714.46
4.3.10.0100.03014.46
4.3.00.0030.01714.46

preferences:
40.16 ms | 401 KiB | 5 Q