3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '2015-09-23' => [ 'user' => [13, 12], 'count' => [ 'count' => 2, 'total' => 2, ], ], '2015-09-24' => [ 'user' => [14], 'count' => [ 'count' => 1, 'total' => 1, ], ], '2015-09-25' => [ 'user' => [15], 'count' => [ 'count' => 1, 'total' => 1, ], ], '2015-09-26' => [ 'user' => [16], 'count' => [ 'count' => 1, 'total' => 1, ], ], '2015-09-27' => [ 'user' => [17, 18], 'count' => [ 'count' => 2, 'total' => 2, ], ], '2015-09-28' => [ 'user' => [19, 20, 21, 22, 23, 24, 25, 26, 27, 28], 'count' => [ 'count' => 10, 'total' => 10, ], ], ]; $total = 0; foreach ($array as ['count' => ['count' => $c, 'total' => &$t]]) { $total += $c; $t = $total; } var_export($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.3.80.0000.00917.97
8.3.70.0150.00018.34
8.3.60.0100.01018.39
8.3.50.0110.00316.45
8.3.40.0060.01223.75
8.3.30.0140.00019.91
8.3.20.0080.00024.18
8.3.10.0070.01121.73
8.3.00.0120.00819.02
8.2.200.0070.00316.38
8.2.190.0000.01516.58
8.2.180.0100.01018.45
8.2.170.0040.01118.96
8.2.160.0030.01022.96
8.2.150.0000.00825.66
8.2.140.0070.01120.38
8.2.130.0160.00020.57
8.2.120.0000.01518.88
8.2.110.0090.00619.14
8.2.100.0110.01118.90
8.2.90.0030.01718.63
8.2.80.0060.00919.14
8.2.70.0070.00718.77
8.2.60.0130.00718.72
8.2.50.0060.01318.75
8.2.40.0120.00318.79
8.2.30.0120.00818.70
8.2.20.0130.00318.82
8.2.10.0090.00918.55
8.2.00.0080.00818.78
8.1.290.0030.00630.84
8.1.280.0110.00725.92
8.1.270.0030.01721.98
8.1.260.0100.01021.95
8.1.250.0070.01022.18
8.1.240.0000.00818.66
8.1.230.0040.00418.40
8.1.220.0080.00818.99
8.1.210.0100.00318.46
8.1.200.0030.00618.91
8.1.190.0060.00318.51
8.1.180.0080.00018.38
8.1.170.0080.00018.42
8.1.160.0090.00018.34
8.1.150.0090.00018.46
8.1.140.0030.00618.45
8.1.130.0090.00018.78
8.1.120.0000.00918.54
8.1.110.0060.00318.43
8.1.100.0060.00318.53
8.1.90.0080.00018.51
8.1.80.0080.00018.60
8.1.70.0050.00318.62
8.1.60.0040.00418.71
8.1.50.0000.00818.68
8.1.40.0040.00418.68
8.1.30.0080.00018.73
8.1.20.0040.00418.73
8.1.10.0040.00418.82
8.1.00.0080.00018.52

preferences:
26.61 ms | 401 KiB | 5 Q