3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '2017-05-01' => [ 'DC' => [ 'IT' => [90, 0], 'DE' => [18, 315, 40, '', 69, 211], 'Other' => [107, 46, '', '', 27, 22] ] ], '2017-05-02' => [ 'DC' => [ 'IT' => [70, 40, 55], 'DE' => ['', 31, 4, '', 9], 'Other' => [1107, 12, 0, 20, 1, 11, 21] ] ], 'fringe case' => [ 'DC' => [ 'IT' => [], 'DE' => ['', '', '', 99], 'Other' => ['', 99] ] ] ]; var_export( array_map( fn($dateSet) => array_map( fn($dcSet) => array_map( function ($set) { if (!$set) { return 0; } sort($set); $count = count($set); $mid = intdiv($count, 2); if ($count & 1) { return $set[$mid]; } return ((int)$set[$mid - 1] + (int)$set[$mid]) / 2; }, $dcSet ), $dateSet ), $array ) );

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.5.10.0110.00716.49
8.5.00.0120.00919.71
8.4.150.0010.00114.05
8.4.140.0120.00917.89
8.4.130.0130.00719.61
8.4.120.0140.00620.52
8.4.110.0110.00922.41
8.4.100.0050.00317.78
8.4.90.0120.00922.51
8.4.80.0050.00518.99
8.4.70.0070.00218.98
8.4.60.0060.00220.48
8.4.50.0140.00718.57
8.4.40.0030.00717.69
8.4.30.0410.01617.02
8.4.20.0380.00917.20
8.4.10.0310.00017.39
8.3.280.0110.00918.50
8.3.270.0030.00516.66
8.3.260.0130.00716.68
8.3.250.0140.00518.86
8.3.240.0110.00816.99
8.3.230.0120.00816.81
8.3.220.0100.01019.12
8.3.210.0080.00916.78
8.3.200.0060.00316.50
8.3.190.0100.01017.30
8.3.180.0110.00818.92
8.3.170.0140.00516.98
8.3.160.0160.00816.41
8.3.150.0250.00616.13
8.3.140.0530.01016.30
8.3.130.0410.00716.13
8.3.120.0330.00616.52
8.3.110.0300.00616.52
8.3.100.0300.00416.68
8.3.90.0280.00416.89
8.3.80.0290.00016.56
8.3.70.0290.01116.51
8.3.60.0330.00616.46
8.3.50.0270.00416.49
8.3.40.0170.00017.31
8.3.30.0260.01017.49
8.3.20.0220.00317.45
8.3.10.0170.00217.34
8.3.00.0150.00917.54
8.2.290.0110.00816.85
8.2.280.0150.00520.03
8.2.270.0280.00816.53
8.2.260.0370.00416.52
8.2.250.0320.00816.67
8.2.240.0290.01116.43
8.2.230.0430.00316.50
8.2.220.0260.01316.29
8.2.210.0280.01016.54
8.2.200.0340.00816.48
8.2.190.0280.01416.57
8.2.180.0280.01116.47
8.2.170.0440.00617.47
8.2.160.0310.00917.61
8.2.150.0320.01317.38
8.2.140.0340.00917.36
8.2.130.0290.00717.38
8.2.120.0350.00817.52
8.2.110.0310.01317.34
8.2.100.0360.00417.38
8.2.90.0250.01617.51
8.2.80.0320.00617.54
8.2.70.0320.00817.36
8.2.60.0230.01317.46
8.2.50.0160.00417.45
8.2.40.0260.00317.48
8.2.30.0240.01417.27
8.2.20.0320.00717.38
8.2.10.0280.00917.39
8.2.00.0290.01017.46
8.1.320.0080.01117.84

preferences:
33.63 ms | 403 KiB | 5 Q