3v4l.org

run code in 300+ PHP versions simultaneously
<?php $custom_fields = [ 'foo' => '17', 'bar' => '17', ]; $time_intervals = ['day', 'month', 'year', 'hour', 'minute', 'period']; $data = [ 'fooday' => '17', 'foomonth' => 'March', 'name' => 'Chris' ]; function array_string_multiply() { $arrays = func_get_args(); $keys = array_fill(array_sum(array_map("count", $tickets)), 0); var_dump($keys); // foreach ($keys as $key) { // $sums[$key] = array_reduce($arrays, function ($sum, $arr) use ($key) { return $sum . @$arr[$key]; }); //} // return $sums; } foreach (array_string_multiply(array_keys($custom_fields), $time_intervals) as $key) { var_dump($key); } 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.0070.00716.75
8.3.50.0080.00722.87
8.3.40.0110.01118.84
8.3.30.0100.00619.22
8.3.20.0040.00420.30
8.3.10.0050.00323.48
8.3.00.0080.00019.38
8.2.180.0060.01216.88
8.2.170.0140.00022.96
8.2.160.0100.00320.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0140.00026.16
8.2.120.0050.00321.02
8.2.110.0030.00621.96
8.2.100.0000.01117.91
8.2.90.0050.00319.05
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0000.01018.04
8.2.50.0070.00418.07
8.2.40.0030.00617.91
8.2.30.0040.00418.14
8.2.20.0000.00817.78
8.2.10.0020.00518.12
8.2.00.0040.00417.95
8.1.280.0070.01025.92
8.1.270.0080.00023.70
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00023.88
8.1.230.0120.00019.16
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0030.00917.48
8.1.190.0080.00017.35
8.1.180.0060.00318.10
8.1.170.0000.00818.52
8.1.160.0050.00322.02
8.1.150.0000.00818.79
8.1.140.0040.00417.38
8.1.130.0000.00717.80
8.1.120.0040.00417.56
8.1.110.0000.00717.47
8.1.100.0000.00717.52
8.1.90.0030.00717.46
8.1.80.0040.00417.45
8.1.70.0030.00617.44
8.1.60.0080.00017.57
8.1.50.0030.00517.43
8.1.40.0030.00617.44
8.1.30.0060.00317.59
8.1.20.0030.00717.50
8.1.10.0040.00417.47
8.1.00.0030.00617.41
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0070.00018.34
8.0.270.0050.00317.18
8.0.260.0000.00617.28
8.0.250.0040.00417.02
8.0.240.0000.00717.07
8.0.230.0030.00316.98
8.0.220.0040.00416.90
8.0.210.0000.00716.94
8.0.200.0030.00316.95
8.0.190.0000.00817.07
8.0.180.0070.00017.02
8.0.170.0080.00016.89
8.0.160.0070.00016.97
8.0.150.0000.00716.92
8.0.140.0000.00716.89
8.0.130.0000.00513.45
8.0.120.0040.00416.95
8.0.110.0000.00816.95
8.0.100.0000.00817.02
8.0.90.0040.00417.03
8.0.80.0090.00616.91
8.0.70.0040.00416.86
8.0.60.0040.00416.81
8.0.50.0030.00517.00
8.0.30.0110.00717.07
8.0.20.0100.00917.41
8.0.10.0000.00717.04
8.0.00.0100.00916.83
7.4.330.0000.00515.13
7.4.320.0030.00316.51
7.4.300.0030.00316.53
7.4.290.0070.00016.36
7.4.280.0000.00816.61
7.4.270.0030.00316.58
7.4.260.0030.00316.55
7.4.250.0030.00516.57
7.4.240.0030.00316.50
7.4.230.0030.00316.71
7.4.220.0130.01316.57
7.4.210.0040.01716.54
7.4.200.0040.00416.54
7.4.160.0090.00616.58
7.4.150.0060.01217.40
7.4.140.0080.00817.86
7.4.130.0070.01416.57
7.4.120.0080.00916.71
7.4.110.0200.00316.61
7.4.100.0090.00916.68
7.4.90.0110.00716.50
7.4.80.0060.01619.39
7.4.70.0140.00316.56
7.4.60.0120.00316.40
7.4.50.0000.00816.32
7.4.40.0090.00916.57
7.4.30.0080.00816.48
7.4.10.0030.01214.75
7.4.00.0070.01015.00
7.3.330.0000.00513.19
7.3.320.0020.00313.39
7.3.310.0070.00016.40
7.3.300.0030.00316.34
7.3.290.0080.01116.37
7.3.280.0100.00516.31
7.3.270.0120.00617.40
7.3.260.0030.01516.51
7.3.240.0070.01016.43
7.3.230.0090.00916.49
7.3.210.0130.00316.45
7.3.200.0150.00419.39
7.3.190.0030.01216.56
7.3.180.0050.01116.61
7.3.170.0040.01716.39
7.3.160.0130.00316.47
7.3.130.0130.00314.84
7.3.120.0130.00315.04
7.3.110.0100.00315.01
7.3.100.0070.00714.52
7.3.90.0030.01314.93
7.3.80.0000.00814.99
7.3.70.0090.00614.67
7.3.60.0060.00614.67
7.3.50.0090.00614.67
7.3.40.0150.00015.00
7.3.30.0000.01014.89
7.3.20.0030.01016.62
7.3.10.0090.00616.68
7.3.00.0040.01116.85
7.2.330.0110.00716.75
7.2.320.0070.01516.72
7.2.310.0160.00016.73
7.2.300.0110.00716.64
7.2.290.0110.00516.54
7.2.260.0060.01214.82
7.2.250.0110.00715.05
7.2.240.0060.00615.22
7.2.230.0110.00415.07
7.2.220.0040.00814.96
7.2.210.0030.00915.05
7.2.200.0000.01615.01
7.2.190.0060.00915.12
7.2.180.0060.00914.71
7.2.170.0100.00315.12
7.2.160.0040.01114.76
7.2.150.0030.01316.84
7.2.140.0110.00417.04
7.2.130.0070.00716.96
7.2.120.0090.00616.87
7.2.110.0000.01217.13
7.2.100.0100.00616.71
7.2.90.0030.00617.07
7.2.80.0030.00916.86
7.2.70.0120.00317.03
7.2.60.0070.00316.75
7.2.50.0040.00717.12
7.2.40.0040.01116.79
7.2.30.0040.01116.78
7.2.20.0030.00916.98
7.2.10.0060.00617.11
7.2.00.0070.00718.20
7.1.330.0030.01015.90
7.1.320.0000.01415.70
7.1.310.0030.01015.54
7.1.300.0030.00915.93
7.1.290.0030.01015.74
7.1.280.0060.00615.95
7.1.270.0090.00615.79
7.1.260.0000.01015.54
7.1.250.0000.01615.71
7.1.240.0040.00815.57
7.1.230.0070.00715.84
7.1.220.0090.00615.91
7.1.210.0040.00415.86
7.1.200.0080.00415.56
7.1.190.0100.00715.75
7.1.180.0100.00715.41
7.1.170.0070.00715.52
7.1.160.0070.00615.74
7.1.150.0070.00415.90
7.1.140.0000.01115.75
7.1.130.0040.00815.91
7.1.120.0100.00315.80
7.1.110.0000.01015.92
7.1.100.0030.00716.96
7.1.90.0080.00015.79
7.1.80.0030.01015.90
7.1.70.0090.00416.40
7.1.60.0070.01217.45
7.1.50.0060.01116.25
7.1.40.0060.00615.85
7.1.30.0030.01015.92
7.1.20.0100.00315.79
7.1.10.0030.01015.76
7.1.00.0070.04019.01
7.0.330.0030.01015.09
7.0.320.0090.00615.57
7.0.310.0070.00715.33
7.0.300.0100.00315.54
7.0.290.0070.00715.49
7.0.280.0070.01015.36
7.0.270.0080.00615.50
7.0.260.0030.00615.38
7.0.250.0060.00815.63
7.0.240.0070.00415.11
7.0.230.0060.00615.13
7.0.220.0060.00615.48
7.0.210.0070.01015.28
7.0.200.0080.00416.11
7.0.190.0000.01115.24
7.0.180.0030.00915.30
7.0.170.0030.00615.55
7.0.160.0040.01115.43
7.0.150.0040.01115.40
7.0.140.0030.04018.85
7.0.130.0060.00615.22
7.0.120.0090.00615.42
7.0.110.0140.00015.46
7.0.100.0090.00315.18
7.0.90.0000.01715.57
7.0.80.0080.00415.38
7.0.70.0030.01115.34
7.0.60.0050.03717.56
7.0.50.0100.01816.70
7.0.40.0100.03316.75
7.0.30.0230.03716.78
7.0.20.0260.03516.84
7.0.10.0120.03116.70
7.0.00.0090.03716.77
5.6.400.0110.00014.54
5.6.390.0080.00414.25
5.6.380.0030.01013.95
5.6.370.0030.00914.33
5.6.360.0030.00914.51
5.6.350.0040.00814.67
5.6.340.0070.00714.19
5.6.330.0040.01114.60
5.6.320.0030.01114.27
5.6.310.0070.01014.45
5.6.300.0100.00714.30
5.6.290.0060.00614.27
5.6.280.0030.04117.56
5.6.270.0030.01314.50
5.6.260.0080.00514.56
5.6.250.0100.00714.11
5.6.240.0040.00714.57
5.6.230.0130.00314.18
5.6.220.0000.01814.26
5.6.210.0050.04317.46
5.6.200.0060.02916.06
5.6.190.0060.03117.43
5.6.180.0180.04817.39
5.6.170.0160.04317.60
5.6.160.0080.02517.48
5.6.150.0030.03116.28
5.6.140.0090.04416.25
5.6.130.0120.05016.30
5.6.120.0020.04317.51
5.6.110.0070.04717.50
5.6.100.0070.04617.73
5.6.90.0050.03217.70
5.6.80.0050.02717.44
5.6.70.0060.00914.44
5.6.60.0070.01014.18
5.6.50.0090.00614.52
5.6.40.0130.00314.09
5.6.30.0120.00314.17
5.6.20.0030.00614.19
5.6.10.0060.00614.12
5.6.00.0090.00313.98
5.5.380.0110.00414.09
5.5.370.0030.01014.45
5.5.360.0090.00914.14
5.5.350.2080.02317.33
5.5.340.0000.02716.31
5.5.330.0080.02117.46
5.5.320.0160.04417.23
5.5.310.0230.04117.39
5.5.300.0040.03216.23
5.5.290.0100.03816.19
5.5.280.0070.04717.33
5.5.270.0070.02417.68
5.5.260.0080.02617.53
5.5.250.0020.04017.33
5.5.240.0010.03317.19
5.5.230.0060.00914.32
5.5.220.0040.01114.26
5.5.210.0090.00014.04
5.5.200.0100.00314.10
5.5.190.0000.00913.91
5.5.180.0070.00414.23
5.5.170.0060.00913.99
5.5.160.0060.00914.28
5.5.150.0060.00614.39
5.5.140.0070.00714.23
5.5.130.0100.00714.35
5.5.120.0000.00914.01
5.5.110.0060.00614.16
5.5.100.0070.00714.30
5.5.90.0110.00014.34
5.5.80.0070.00714.14
5.5.70.0060.00314.12
5.5.60.0060.00614.36
5.5.50.0000.00814.18
5.5.40.0030.00714.16
5.5.30.0030.01014.11
5.5.20.0000.01214.26
5.5.10.0000.01314.44
5.5.00.0070.00713.73
5.4.450.0400.03615.96
5.4.440.0370.03715.79
5.4.430.0500.03115.94
5.4.420.0380.03015.87
5.4.410.0350.03015.86
5.4.400.0170.03915.78
5.4.390.0340.03315.75
5.4.380.0050.03215.42
5.4.370.0000.02915.40
5.4.360.0060.02415.48
5.4.350.0060.03112.18
5.4.340.0080.02612.18
5.4.330.0000.00612.34
5.4.320.0050.02312.42
5.4.310.0050.02412.42
5.4.300.0080.02212.42
5.4.290.0030.02312.42
5.4.280.0070.01912.37
5.4.270.0070.01912.37
5.4.260.0070.01912.37
5.4.250.0060.01912.37
5.4.240.0020.02512.37
5.4.230.0060.02212.36
5.4.220.0080.01912.37
5.4.210.0050.02212.36
5.4.200.0060.02112.37
5.4.190.0060.02312.36
5.4.180.0070.02112.36
5.4.170.0070.02012.37
5.4.160.0030.02212.37
5.4.150.0020.02312.36
5.4.140.0030.02412.21
5.4.130.0040.02212.20
5.4.120.0020.02212.18
5.4.110.0060.01912.18
5.4.100.0040.02012.18
5.4.90.0060.02212.18
5.4.80.0050.02112.18
5.4.70.0060.02012.17
5.4.60.0040.02212.18
5.4.50.0070.01812.17
5.4.40.0040.02112.17
5.4.30.0070.01712.17
5.4.20.0050.02112.17
5.4.10.0070.02112.17
5.4.00.0050.02211.91
5.3.290.0090.03612.80
5.3.280.0110.03212.71
5.3.270.0040.04012.72
5.3.260.0050.03912.72
5.3.250.0090.03612.71
5.3.240.0040.04012.71
5.3.230.0040.03912.71
5.3.220.0090.03412.68
5.3.210.0040.04012.68
5.3.200.0050.03812.68
5.3.190.0060.05212.68
5.3.180.0040.03912.67
5.3.170.0030.04012.67
5.3.160.0070.03612.67
5.3.150.0050.03812.68
5.3.140.0100.03212.66
5.3.130.0060.04012.66
5.3.120.0140.04312.65
5.3.110.0070.03812.66
5.3.100.0050.03712.12
5.3.90.0060.03612.08
5.3.80.0080.03412.07
5.3.70.0080.03312.08
5.3.60.0050.03712.06
5.3.50.0050.03712.00
5.3.40.0040.03712.00
5.3.30.0070.03311.95
5.3.20.0080.03311.73
5.3.10.0060.03511.70
5.3.00.0080.03411.68
5.2.170.0030.0329.18
5.2.160.0040.0299.18
5.2.150.0040.0319.18
5.2.140.0100.0259.18
5.2.130.0040.0309.14
5.2.120.0040.0379.14
5.2.110.0040.0339.14
5.2.100.0050.0309.14
5.2.90.0080.0309.14
5.2.80.0050.0319.14
5.2.70.0060.0309.14
5.2.60.0060.0319.09
5.2.50.0060.0369.06
5.2.40.0050.0289.04
5.2.30.0030.0319.01
5.2.20.0030.0299.01
5.2.10.0040.0298.93
5.2.00.0020.0328.79
5.1.60.0020.0258.07
5.1.50.0030.0268.06
5.1.40.0040.0248.05
5.1.30.0060.0238.40
5.1.20.0040.0268.42
5.1.10.0050.0248.14
5.1.00.0040.0258.14
5.0.50.0050.0186.63
5.0.40.0020.0206.48
5.0.30.0010.0336.29
5.0.20.0030.0196.27
5.0.10.0040.0196.24
5.0.00.0010.0336.23
4.4.90.0030.0154.77
4.4.80.0020.0164.76
4.4.70.0010.0174.75
4.4.60.0020.0164.76
4.4.50.0040.0144.77
4.4.40.0030.0244.70
4.4.30.0040.0144.76
4.4.20.0060.0124.84
4.4.10.0020.0164.85
4.4.00.0030.0244.76
4.3.110.0010.0174.67
4.3.100.0040.0184.67
4.3.90.0050.0184.63
4.3.80.0050.0274.58
4.3.70.0020.0164.63
4.3.60.0030.0144.62
4.3.50.0020.0164.63
4.3.40.0030.0234.54
4.3.30.0020.0163.29
4.3.20.0010.0173.25
4.3.10.0020.0153.22
4.3.00.0170.0207.93

preferences:
51.85 ms | 401 KiB | 5 Q