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(array_keys(null, $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.0040.01218.68
8.3.50.0130.00622.75
8.3.40.0090.00918.97
8.3.30.0030.01018.95
8.3.20.0070.00020.04
8.3.10.0000.00723.48
8.3.00.0040.00417.38
8.2.180.0090.00616.75
8.2.170.0060.00922.96
8.2.160.0140.00020.34
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0120.00626.16
8.2.120.0000.00720.95
8.2.110.0100.00022.07
8.2.100.0060.00617.59
8.2.90.0000.00819.28
8.2.80.0040.00417.97
8.2.70.0000.00917.50
8.2.60.0110.00417.66
8.2.50.0040.00718.07
8.2.40.0070.00318.16
8.2.30.0080.00018.05
8.2.20.0050.00217.55
8.2.10.0000.00818.00
8.2.00.0070.00017.71
8.1.280.0070.00725.92
8.1.270.0050.00323.97
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0040.00423.92
8.1.230.0040.00818.97
8.1.220.0030.00617.79
8.1.210.0000.00818.77
8.1.200.0080.00417.23
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0000.00818.64
8.1.160.0040.00421.95
8.1.150.0000.00818.71
8.1.140.0040.00417.43
8.1.130.0000.00717.87
8.1.120.0070.00017.27
8.1.110.0000.00817.33
8.1.100.0050.00317.41
8.1.90.0040.00717.29
8.1.80.0040.00317.39
8.1.70.0000.00717.27
8.1.60.0080.00017.39
8.1.50.0000.00817.41
8.1.40.0040.00417.54
8.1.30.0050.00317.61
8.1.20.0040.00417.51
8.1.10.0040.00417.57
8.1.00.0040.00417.46
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.38
8.0.270.0000.00717.05
8.0.260.0060.00017.09
8.0.250.0060.00016.90
8.0.240.0040.00416.84
8.0.230.0030.00316.93
8.0.220.0000.00816.82
8.0.210.0070.00016.95
8.0.200.0040.00416.91
8.0.190.0040.00416.88
8.0.180.0000.00716.80
8.0.170.0040.00416.79
8.0.160.0040.00416.96
8.0.150.0040.00416.83
8.0.140.0040.00416.87
8.0.130.0000.00613.30
8.0.120.0000.00816.79
8.0.110.0040.00416.84
8.0.100.0050.00316.86
8.0.90.0030.00316.90
8.0.80.0170.00316.82
8.0.70.0040.00416.84
8.0.60.0050.00316.80
8.0.50.0040.00416.99
8.0.30.0080.01017.03
8.0.20.0120.00817.40
8.0.10.0040.00417.06
8.0.00.0110.00816.61
7.4.330.0020.00215.15
7.4.320.0000.00616.58
7.4.300.0030.00316.49
7.4.290.0000.00716.40
7.4.280.0040.00416.61
7.4.270.0040.00316.50
7.4.260.0000.00916.56
7.4.250.0000.00716.53
7.4.240.0000.00816.48
7.4.230.0070.00016.59
7.4.220.0060.01316.61
7.4.210.0070.00716.50
7.4.200.0040.00416.48
7.4.160.0120.00316.43
7.4.150.0130.00617.40
7.4.140.0110.00917.86
7.4.130.0100.01016.44
7.4.120.0120.00416.42
7.4.110.0060.01816.57
7.4.100.0060.01216.44
7.4.90.0060.01316.42
7.4.80.0030.01319.39
7.4.70.0100.00716.63
7.4.60.0070.01016.41
7.4.50.0050.00316.66
7.4.40.0030.01316.55
7.4.30.0110.00616.20
7.4.10.0110.00715.15
7.4.00.0100.00714.95
7.3.330.0000.00713.14
7.3.320.0000.00513.00
7.3.310.0030.00316.12
7.3.300.0030.00316.22
7.3.290.0110.00816.37
7.3.280.0080.01016.32
7.3.270.0190.01617.40
7.3.260.0100.01016.65
7.3.250.0050.01416.56
7.3.240.0100.01316.26
7.3.230.0080.00816.39
7.3.210.0120.00816.20
7.3.200.0160.00619.39
7.3.190.0030.01316.45
7.3.180.0100.00716.43
7.3.170.0080.00816.43
7.3.160.0090.00616.59
7.3.130.0030.01014.97
7.3.120.0040.01114.63
7.3.110.0060.01214.89
7.3.100.0150.00014.77
7.3.90.0100.00714.90
7.3.80.0080.00415.02
7.3.70.0030.01214.79
7.3.60.0070.00714.57
7.3.50.0060.00314.80
7.3.40.0100.00314.62
7.3.30.0100.00314.88
7.3.20.0090.00316.74
7.3.10.0070.01116.66
7.3.00.0060.01016.64
7.2.330.0130.00616.59
7.2.320.0070.01416.64
7.2.310.0120.00616.59
7.2.300.0080.00816.45
7.2.290.0080.00816.41
7.2.260.0030.01214.99
7.2.250.0070.01314.99
7.2.240.0070.00714.97
7.2.230.0110.00414.98
7.2.220.0030.01315.14
7.2.210.0100.00315.00
7.2.200.0030.01315.05
7.2.190.0070.01015.00
7.2.180.0000.01415.04
7.2.170.0060.00815.07
7.2.160.0060.00314.89
7.2.150.0150.00016.80
7.2.140.0100.00716.96
7.2.130.0120.00317.04
7.2.120.0090.00616.80
7.2.110.0040.01116.86
7.2.100.0030.01316.97
7.2.90.0140.00316.98
7.2.80.0050.00916.89
7.2.70.0060.00916.89
7.2.60.0020.01016.93
7.2.50.0030.01016.92
7.2.40.0070.01116.80
7.2.30.0080.00316.61
7.2.20.0070.00716.75
7.2.10.0030.01016.88
7.2.00.0090.00818.15
7.1.330.0070.00715.95
7.1.320.0000.01715.72
7.1.310.0130.00315.56
7.1.300.0090.00315.80
7.1.290.0040.01115.91
7.1.280.0040.00415.48
7.1.270.0060.00915.75
7.1.260.0060.01215.78
7.1.250.0040.00715.76
7.1.240.0060.00615.63
7.1.230.0070.00415.81
7.1.220.0060.01015.66
7.1.210.0030.00715.57
7.1.200.0020.01215.70
7.1.190.0030.00615.48
7.1.180.0070.00715.71
7.1.170.0030.00615.65
7.1.160.0030.01015.88
7.1.150.0070.00315.63
7.1.140.0000.01415.63
7.1.130.0060.00915.93
7.1.120.0100.01015.77
7.1.110.0040.01115.68
7.1.100.0050.00717.12
7.1.90.0090.00015.80
7.1.80.0040.01215.56
7.1.70.0070.00416.46
7.1.60.0080.01017.67
7.1.50.0100.00916.37
7.1.40.0090.00615.79
7.1.30.0090.00615.90
7.1.20.0090.00615.82
7.1.10.0090.00315.71
7.1.00.0040.04319.09
7.0.330.0040.00415.48
7.0.320.0070.00315.48
7.0.310.0030.00815.35
7.0.300.0040.01115.28
7.0.290.0060.00315.61
7.0.280.0070.00415.02
7.0.270.0040.01515.38
7.0.260.0040.00815.36
7.0.250.0090.00615.41
7.0.240.0070.00415.56
7.0.230.0000.01415.58
7.0.220.0110.00415.53
7.0.210.0030.00615.40
7.0.200.0040.00615.84
7.0.190.0060.00915.43
7.0.180.0090.00615.46
7.0.170.0000.01415.37
7.0.160.0030.01315.48
7.0.150.0030.00715.45
7.0.140.0070.03918.80
7.0.130.0060.00615.49
7.0.120.0030.01015.36
7.0.110.0100.00315.54
7.0.100.0070.00715.39
7.0.90.0000.01115.35
7.0.80.0070.00715.43
7.0.70.0040.00815.06
7.0.60.0020.03317.75
7.0.50.0070.02316.49
7.0.40.0090.03516.94
7.0.30.0200.04016.88
7.0.20.0220.04016.83
7.0.10.0030.02816.79
7.0.00.0050.04816.95
5.6.400.0030.01314.56
5.6.390.0060.00914.53
5.6.380.0040.00714.61
5.6.370.0000.01514.39
5.6.360.0070.00914.40
5.6.350.0080.00414.47
5.6.340.0060.00614.38
5.6.330.0040.01214.04
5.6.320.0040.00414.22
5.6.310.0110.00414.44
5.6.300.0040.00714.42
5.6.290.0040.00814.49
5.6.280.0030.04117.51
5.6.270.0000.00814.67
5.6.260.0040.00414.39
5.6.250.0000.00814.21
5.6.240.0070.00714.43
5.6.230.0020.01414.22
5.6.220.0120.00014.04
5.6.210.0070.04217.38
5.6.200.0050.02316.19
5.6.190.0070.04417.23
5.6.180.0190.03917.40
5.6.170.0140.03017.29
5.6.160.0060.02417.26
5.6.150.0080.02016.15
5.6.140.0050.01916.31
5.6.130.0050.04016.08
5.6.120.0040.04717.73
5.6.110.0110.04117.68
5.6.100.0130.03817.57
5.6.90.0050.03317.55
5.6.80.0060.04117.29
5.6.70.0060.00314.38
5.6.60.0000.01114.27
5.6.50.0030.00514.22
5.6.40.0070.01014.09
5.6.30.0070.00414.30
5.6.20.0100.00313.94
5.6.10.0040.01514.05
5.6.00.0140.00514.31
5.5.380.0090.00614.41
5.5.370.0060.00614.32
5.5.360.0060.00814.40
5.5.350.1500.02717.23
5.5.340.0030.03016.07
5.5.330.0020.04217.06
5.5.320.0090.02417.34
5.5.310.0110.02517.22
5.5.300.0070.02116.10
5.5.290.0090.04016.17
5.5.280.0090.04017.43
5.5.270.0080.03317.65
5.5.260.0100.04017.66
5.5.250.0080.03317.46
5.5.240.0000.04417.01
5.5.230.0060.00613.83
5.5.220.0080.00814.07
5.5.210.0070.00713.98
5.5.200.0090.01014.20
5.5.190.0080.01213.90
5.5.180.0090.00914.24
5.5.170.0040.01314.24
5.5.160.0150.00314.12
5.5.150.0120.00614.01
5.5.140.0110.00814.51
5.5.130.0000.01314.29
5.5.120.0060.00914.14
5.5.110.0080.00814.04
5.5.100.0060.00613.88
5.5.90.0000.01114.43
5.5.80.0110.00413.95
5.5.70.0090.00613.71
5.5.60.0030.01013.98
5.5.50.0050.00514.03
5.5.40.0080.00414.14
5.5.30.0040.00813.93
5.5.20.0080.00013.99
5.5.10.0060.00613.90
5.5.00.0030.00614.19
5.4.450.2140.02215.07
5.4.440.1500.02515.02
5.4.430.1630.01915.18
5.4.420.1680.02015.20
5.4.410.1920.02315.09
5.4.400.1720.01915.03
5.4.390.1750.01814.88
5.4.380.1750.02314.95
5.4.370.1630.02015.00
5.4.360.1750.02414.81
5.4.350.1780.02215.00
5.4.340.1550.02214.96
5.4.330.0030.00710.96
5.4.320.1810.02014.92
5.4.310.1870.02514.89
5.4.300.1950.01714.97
5.4.290.1880.02514.88
5.4.280.1600.02514.81
5.4.270.1900.02515.03
5.4.260.1900.02314.94
5.4.250.1800.02014.80
5.4.240.1960.01815.01
5.4.230.1970.02514.84
5.4.220.2210.02514.81
5.4.210.2080.01615.09
5.4.200.2030.02414.89
5.4.190.1800.01914.90
5.4.180.1850.02514.94
5.4.170.1670.02514.88
5.4.160.2230.01815.00
5.4.150.2170.02014.89
5.4.140.2100.02113.73
5.4.130.2080.02513.53
5.4.120.2130.02013.76
5.4.110.2070.02113.60
5.4.100.2000.01213.50
5.4.90.1720.02213.63
5.4.80.1850.02313.48
5.4.70.1840.01913.66
5.4.60.1880.01813.52
5.4.50.2110.02013.51
5.4.40.1820.02413.33
5.4.30.2030.02013.54
5.4.20.2150.01813.63
5.4.10.2060.02013.73
5.4.00.2140.01813.34
5.3.290.3670.04314.61
5.3.280.3330.04014.57
5.3.270.3700.03714.55
5.3.260.2970.04014.59
5.3.250.4300.03714.45
5.3.240.4270.03714.56
5.3.230.4270.03714.53
5.3.220.4230.04014.52
5.3.210.4230.03314.55
5.3.200.4230.03014.59
5.3.190.3500.04014.43
5.3.180.3600.03714.47
5.3.170.3500.03714.44
5.3.160.3700.04714.51
5.3.150.4230.03714.40
5.3.140.4200.04014.65
5.3.130.4000.03714.42
5.3.120.4070.04014.59
5.3.110.4200.03314.39
5.3.100.3870.04013.98
5.3.90.4200.03313.88
5.3.80.4070.03313.81
5.3.70.4100.03314.06
5.3.60.3770.03313.88
5.3.50.4130.03713.89
5.3.40.3030.03313.79
5.3.30.3200.03313.79
5.3.20.3100.03313.73
5.3.10.3030.03713.66
5.3.00.2800.03713.48
5.2.170.3130.03011.10
5.2.160.3530.03011.30
5.2.150.3170.03711.24
5.2.140.2600.03011.16
5.2.130.2870.02711.12
5.2.120.2600.02310.99
5.2.110.2770.02711.13
5.2.100.2530.03011.04
5.2.90.2470.03010.94
5.2.80.2830.02310.93
5.2.70.2030.03011.11
5.2.60.2470.02710.98
5.2.50.2730.02710.87
5.2.40.2000.03010.89
5.2.30.1770.02710.99
5.2.20.2130.03311.05
5.2.10.2330.03310.75
5.2.00.2400.03310.78
5.1.60.2200.0309.86
5.1.50.2170.0309.88
5.1.40.2430.0239.91
5.1.30.2430.02710.29
5.1.20.2500.03010.42
5.1.10.2230.02010.23
5.1.00.2230.02710.00
5.0.50.1530.0208.47
5.0.40.1430.0238.38
5.0.30.1330.0338.32
5.0.20.1070.0178.11
5.0.10.1630.0238.25
5.0.00.1300.0378.23
4.4.90.1130.0175.89
4.4.80.1130.0175.89
4.4.70.1100.0175.89
4.4.60.1130.0175.89
4.4.50.1200.0135.89
4.4.40.1100.0235.89
4.4.30.1170.0175.89
4.4.20.1070.0175.89
4.4.10.1330.0175.96
4.4.00.1700.0335.89
4.3.110.1300.0175.89
4.3.100.1330.0135.89
4.3.90.1330.0135.89
4.3.80.1670.0275.89
4.3.70.1570.0135.89
4.3.60.1300.0205.89
4.3.50.1330.0205.89
4.3.40.1130.0275.89
4.3.30.0770.0235.89
4.3.20.0670.0205.89
4.3.10.0600.0175.89
4.3.00.0730.0205.89

preferences:
43.23 ms | 401 KiB | 5 Q