3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Tinker away! $periods = \App\Models\Period::query() ->select('id', 'period_type', 'period_name', 'period_year') ->groupBy('period_year', 'period_type') ->orderBy('period_year') ->get() ->groupBy('period_year') ->map(function ($item, $key) { return [ 'year' => $key, 'periods' => $item->groupBy('period_type')->map(function ($item, $key) { return [ 'type' => $key, 'periods' => $item->map(function ($key,$item) { return [ 'id' => $item->id, 'period_type' => $item->period_type, // 'semester', 'trimester', 'year 'period_name' => $item->period_name, 'period_year' => $item->period_year, 'formatted_period_start_date' => $item->formatted_period_start_date, 'formatted_period_end_date' => $item->formatted_period_end_date, ]; })->toArray() ]; }) ]; }) ->toArray();

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.110.0090.00620.94
8.3.100.0060.00318.43
8.3.90.0040.00726.77
8.3.80.0040.00818.56
8.3.70.0060.00918.43
8.3.60.0090.00618.31
8.3.50.0150.00316.79
8.3.40.0130.00722.22
8.3.30.0100.00321.73
8.3.20.0100.00724.18
8.3.10.0060.00324.66
8.3.00.0070.00526.86
8.2.230.0060.00322.58
8.2.220.0080.00024.06
8.2.210.0040.00426.77
8.2.200.0050.00516.88
8.2.190.0160.00318.18
8.2.180.0070.01118.16
8.2.170.0070.01418.73
8.2.160.0070.00722.96
8.2.150.0070.01025.66
8.2.140.0080.00024.66
8.2.130.0100.00727.35
8.2.120.0070.00525.11
8.2.110.0080.00725.52
8.2.100.0080.00925.08
8.2.90.0130.00724.42
8.2.80.0130.00524.39
8.2.70.0110.00424.34
8.2.60.0150.00624.31
8.2.50.0080.00524.79
8.2.40.0140.00524.42
8.2.30.0150.00224.31
8.2.20.0050.00924.43
8.2.10.0120.00524.47
8.2.00.0110.00624.43
8.1.290.0060.00330.84
8.1.280.0110.00725.92
8.1.270.0090.00023.99
8.1.260.0050.00726.93
8.1.250.0070.00827.22
8.1.240.0140.00424.31
8.1.230.0110.00824.35
8.1.220.0090.00624.23
8.1.210.0090.00524.78
8.1.200.0130.00124.29
8.1.190.0110.00324.28
8.1.180.0090.00524.29
8.1.170.0090.00424.30
8.1.160.0110.00324.41
8.1.150.0060.00625.02
8.1.140.0110.00224.31
8.1.130.0060.00524.27
8.1.120.0070.00324.29
8.1.110.0070.00324.29
8.1.100.0080.00324.31
8.1.90.0090.00624.21
8.1.80.0070.00324.32
8.1.70.0120.00924.38
8.1.60.0120.00724.35
8.1.50.0120.00524.27
8.1.40.0100.00524.37
8.1.30.0080.00524.45
8.1.20.0100.00524.33
8.1.10.0110.00324.43
8.1.00.0120.00324.30
8.0.300.0120.00324.04
8.0.290.0060.00723.99
8.0.280.0090.00924.09
8.0.270.0070.00424.08
8.0.260.0100.00324.22
8.0.250.0090.00824.12
8.0.240.0090.00424.13
8.0.230.0100.00524.23
8.0.220.0020.00924.07
8.0.210.0090.00524.08
8.0.200.0120.00224.10
8.0.190.0100.00324.27
8.0.180.0070.00724.05
8.0.170.0070.00424.09
8.0.160.0050.00724.05
8.0.150.0080.00324.06
8.0.140.0120.00324.09
8.0.130.0080.00424.17
8.0.120.0110.00224.10
8.0.110.0080.00224.17
8.0.100.0050.00624.07
8.0.90.0110.00224.09
8.0.80.0060.00624.09
8.0.70.0050.00824.07
8.0.60.0100.00524.19
8.0.50.0160.00424.13
8.0.30.0090.00424.15
8.0.20.0080.00424.16
8.0.10.0070.00524.08

preferences:
28.54 ms | 403 KiB | 5 Q