3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( 0 => array ( 0 => array ( 0 => array ( 'dataAula' => '2020-09-21', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 4, ), ), 1 => array ( 1 => array ( 'dataAula' => '2020-09-22', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 8, ), ), 2 => array ( 2 => array ( 'dataAula' => '2020-09-28', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 12, ), ), 3 => array ( 3 => array ( 'dataAula' => '2020-09-29', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 16, ), ), 4 => array ( 4 => array ( 'dataAula' => '2020-10-06', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 20, ), ), 5 => array ( 5 => array ( 'dataAula' => '2020-10-12', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 24, ), ), 6 => array ( 6 => array ( 'dataAula' => '2020-10-13', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 28, ), ), 7 => array ( 7 => array ( 'dataAula' => '2020-10-19', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 32, ), ), 8 => array ( 8 => array ( 'dataAula' => '2020-10-20', 'tempos' => 1, 'tempos2' => 'Terça', 'total' => 33, ), ), ), 1 => array ( 0 => array ( 0 => array ( 'dataAula' => '2020-10-20', 'tempos' => 3, 'tempos2' => 'Segunda', 'total' => 3, ), ), 1 => array ( 1 => array ( 'dataAula' => '2020-10-27', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 7, ), ), 2 => array ( 2 => array ( 'dataAula' => '2020-11-02', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 11, ), ), 3 => array ( 3 => array ( 'dataAula' => '2020-11-03', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 15, ), ), 4 => array ( 4 => array ( 'dataAula' => '2020-11-09', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 19, ), ), 5 => array ( 5 => array ( 'dataAula' => '2020-11-10', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 23, ), ), 6 => array ( 6 => array ( 'dataAula' => '2020-11-16', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 27, ), ), 7 => array ( 7 => array ( 'dataAula' => '2020-11-17', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 31, ), ), 8 => array ( 8 => array ( 'dataAula' => '2020-11-23', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 35, ), ), 9 => array ( 9 => array ( 'dataAula' => '2020-11-24', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 39, ), ), 10 => array ( 10 => array ( 'dataAula' => '2020-11-30', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 43, ), ), 11 => array ( 11 => array ( 'dataAula' => '2020-12-07', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 47, ), ), 12 => array ( 12 => array ( 'dataAula' => '2020-12-14', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 51, ), ), 13 => array ( 13 => array ( 'dataAula' => '2020-12-15', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 55, ), ), 14 => array ( 14 => array ( 'dataAula' => '2021-01-04', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 59, ), ), 15 => array ( 15 => array ( 'dataAula' => '2021-01-05', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 63, ), ), 16 => array ( 16 => array ( 'dataAula' => '2021-01-11', 'tempos' => 4, 'tempos2' => 'Segunda', 'total' => 67, ), ), ), 2 => array ( 0 => array ( 0 => array ( 'dataAula' => '2021-01-12', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 4, ), ), 1 => array ( 1 => array ( 'dataAula' => '2021-01-18', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 8, ), ), 2 => array ( 2 => array ( 'dataAula' => '2021-01-19', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 12, ), ), 3 => array ( 3 => array ( 'dataAula' => '2021-01-25', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 16, ), ), 4 => array ( 4 => array ( 'dataAula' => '2021-01-26', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 20, ), ), 5 => array ( 5 => array ( 'dataAula' => '2021-02-01', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 24, ), ), 6 => array ( 6 => array ( 'dataAula' => '2021-02-02', 'tempos' => '4', 'tempos2' => 'Terça', 'total' => 28, ), ), 7 => array ( 7 => array ( 'dataAula' => '2021-02-08', 'tempos' => '4', 'tempos2' => 'Segunda', 'total' => 32, ), ), 8 => array ( 8 => array ( 'dataAula' => '2021-02-09', 'tempos' => 1, 'tempos2' => 'Terça', 'total' => 33, ), ), ), ); $result = []; //Loop over list $array, each item of which is another list. foreach ($array as $level1){ //Loop over the sub-list. foreach ($level1 as $level2){ //$level2 is a single-element array with the same index as it's parent. Extract that single element. $level2 = current($level2); $date = $level2['dataAula']; if (isset($result[$date])){ $result[$date]['tempos'] .= '+' . $level2['tempos']; } else { $result[$date] = $level2; } } } var_export($result);

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.00616.50
8.3.50.0070.00716.30
8.3.40.0110.00422.08
8.3.30.0090.00919.02
8.3.20.0080.00024.18
8.3.10.0000.00824.66
8.3.00.0080.00026.16
8.2.180.0110.00325.92
8.2.170.0110.01420.68
8.2.160.0110.00322.96
8.2.150.0050.00325.66
8.2.140.0060.00324.66
8.2.130.0060.00326.16
8.2.120.0000.00726.35
8.2.110.0110.00819.30
8.2.100.0000.01317.78
8.2.90.0000.00917.88
8.2.80.0080.00018.96
8.2.70.0060.00317.75
8.2.60.0040.00417.62
8.2.50.0000.00818.05
8.2.40.0000.00820.07
8.2.30.0050.00318.21
8.2.20.0050.00218.21
8.2.10.0000.00819.41
8.2.00.0030.00519.38
8.1.280.0140.00425.92
8.1.270.0030.00523.99
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0030.00621.00
8.1.230.0060.00617.77
8.1.220.0070.00417.79
8.1.210.0060.00318.77
8.1.200.0060.00317.48
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0030.00618.46
8.1.160.0040.00418.86
8.1.150.0040.00418.93
8.1.140.0080.00018.81
8.1.130.0030.00320.23
8.1.120.0000.00717.49
8.1.110.0040.00417.48
8.1.100.0000.01017.58
8.1.90.0000.00817.53
8.1.80.0040.00417.49
8.1.70.0000.00717.39
8.1.60.0060.00317.63
8.1.50.0000.00817.61
8.1.40.0030.00517.47
8.1.30.0040.00417.63
8.1.20.0080.00017.52
8.1.10.0000.00917.52
8.1.00.0110.00317.62
8.0.300.0060.00318.77
8.0.290.0060.00316.75
8.0.280.0040.00418.49
8.0.270.0070.00017.98
8.0.260.0000.00720.24
8.0.250.0000.00717.04
8.0.240.0000.00716.89
8.0.230.0070.00016.89
8.0.220.0000.00716.86
8.0.210.0000.00716.95
8.0.200.0040.00416.98
8.0.190.0080.00016.87
8.0.180.0000.00716.85
8.0.170.0060.00316.84
8.0.160.0050.00317.00
8.0.150.0040.00416.82
8.0.140.0030.00716.90
8.0.130.0000.00613.38
8.0.120.0000.00816.79
8.0.110.0040.00417.04
8.0.100.0030.00516.78
8.0.90.0050.00317.00
8.0.80.0110.00816.96
8.0.70.0000.00816.91
8.0.60.0040.00417.05
8.0.50.0050.00316.97
8.0.30.0070.01017.28
8.0.20.0130.00817.15
8.0.10.0000.00817.00
8.0.00.0030.01516.99
7.4.330.0000.00516.74
7.4.320.0060.00016.62
7.4.300.0060.00016.67
7.4.290.0040.00716.49
7.4.280.0030.00616.67
7.4.270.0030.00316.62
7.4.260.0030.00313.28
7.4.250.0000.00716.55
7.4.240.0040.00416.66
7.4.230.0000.00716.44
7.4.220.0020.00516.44
7.4.210.0050.01016.66
7.4.200.0030.00316.39
7.4.130.0100.01316.59
7.4.120.0130.00716.62
7.4.110.0100.00616.63
7.4.100.0120.00416.54
7.4.90.0070.01016.28
7.4.80.0100.00716.66
7.4.70.0090.00916.75
7.4.60.0100.00716.63
7.4.50.0060.01016.43
7.4.40.0030.01416.32
7.4.30.0100.00616.50
7.4.20.0120.00316.37
7.4.10.0040.01216.53
7.4.00.0030.01316.58
7.3.330.0040.00416.21
7.3.320.0030.00313.27
7.3.310.0000.00816.23
7.3.300.0000.00716.35
7.3.290.0020.01216.35
7.3.260.0150.00716.39
7.3.230.0120.00916.26
7.3.220.0060.01016.54
7.3.210.0100.00716.61
7.3.200.0110.01116.67
7.3.190.0180.00316.52
7.3.180.0100.00616.57
7.3.170.0040.01216.38
7.3.160.0070.01016.36
7.3.150.0110.00516.72
7.3.140.0100.00616.38
7.3.130.0080.00816.66
7.3.120.0130.00416.39
7.3.110.0100.00516.24
7.3.100.0130.00516.39
7.3.90.0120.00416.51
7.3.80.0080.00816.63
7.3.70.0130.00316.59
7.3.60.0120.00316.33
7.3.50.0150.00416.36
7.3.40.0120.00416.46
7.3.30.0090.00916.38
7.3.20.0040.01316.53
7.3.10.0030.01316.31
7.3.00.0060.00916.50
7.2.340.0130.00716.58
7.2.330.0000.01716.64
7.2.320.0130.00316.67
7.2.310.0070.01016.67
7.2.300.0100.00716.38
7.2.290.0030.01316.83
7.2.280.0100.00716.78
7.2.270.0100.00716.49
7.2.260.0060.01016.35
7.2.250.0090.00916.57
7.2.240.0070.00716.80
7.2.230.0000.01716.58
7.2.220.0080.00816.59
7.2.210.0070.00916.91
7.2.200.0190.00416.65
7.2.190.0100.01316.80
7.2.180.0040.01316.73
7.2.170.0050.01516.65
7.2.160.0100.00716.44
7.2.150.0100.00716.65
7.2.140.0160.00016.50
7.2.130.0080.00816.75
7.2.120.0040.01316.73
7.2.110.0100.00716.78
7.2.100.0060.00916.66
7.2.90.0110.00716.61
7.2.80.0150.00316.62
7.2.70.0100.00716.66
7.2.60.0080.01216.84
7.2.50.0170.00816.75
7.2.40.0100.01016.67
7.2.30.0070.01116.77
7.2.20.0100.00716.69
7.2.10.0060.01216.63
7.2.00.0110.01116.66

preferences:
64.43 ms | 401 KiB | 5 Q