3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ (object) ['graduateYear' => 'Class of 2007', 'id' => 1, 'lastsName' => 'Igbashio', 'firstName' => 'Kalifort'], (object) ['graduateYear' => 'Class of 2007', 'id' => 2, 'lastsName' => 'Usman', 'firstName' => 'Bello'], (object) ['graduateYear' => 'Class of 2007', 'id' => 3, 'lastsName' => 'Manasseh', 'firstName' => 'Isa'], (object) ['graduateYear' => 'Class of 2008', 'id' => 4, 'lastsName' => 'Igbashio', 'firstName' => 'Sansa'], (object) ['graduateYear' => 'Class of 2008', 'id' => 5, 'lastsName' => 'Yusuf', 'firstName' => "Sa'atu"], (object) ['graduateYear' => 'Class of 2008', 'id' => 6, 'lastsName' => 'Rimamtse', 'firstName' => 'Bleesing'], ]; $grouped = []; foreach ($array as $obj) { sscanf($obj->graduateYear, 'Class of %d', $year); unset($obj->graduateYear); $grouped[$year]['title'] = $year; // doesn't matter that this is overwritten over and over $grouped[$year]['data'][] = $obj; } var_export(array_values($grouped));

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.0070.01020.11
8.5.00.0170.01319.91
8.4.160.0130.00823.84
8.4.150.0020.00014.05
8.4.140.0100.01017.50
8.4.130.0120.01017.77
8.4.120.0110.01022.37
8.4.110.0090.01118.53
8.4.100.0150.00617.77
8.4.90.0120.00820.51
8.4.80.0060.00218.79
8.4.70.0110.00818.98
8.4.60.0060.00318.97
8.4.50.0130.00418.72
8.4.40.0100.01019.48
8.4.30.0060.01518.58
8.4.20.0140.00719.56
8.4.10.0060.00323.61
8.3.280.0020.00014.05
8.3.270.0110.00916.67
8.3.260.0120.00516.55
8.3.250.0110.00817.24
8.3.240.0100.00916.52
8.3.230.0130.00716.82
8.3.220.0130.00619.15
8.3.210.0090.01116.79
8.3.200.0050.00416.68
8.3.190.0090.00717.18
8.3.180.0140.00718.64
8.3.170.0090.00917.13
8.3.160.0150.00317.16
8.3.150.0000.00816.85
8.3.140.0040.01117.43
8.3.130.0060.00318.66
8.3.120.0060.00320.68
8.3.110.0030.00520.94
8.3.100.0000.00816.63
8.3.90.0110.00726.77
8.3.80.0060.00318.43
8.3.70.0110.01116.63
8.3.60.0110.00718.45
8.3.50.0070.00718.57
8.3.40.0070.00720.22
8.3.30.0030.01218.84
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0100.00916.74
8.2.280.0130.00418.59
8.2.270.0050.00316.91
8.2.260.0070.01316.71
8.2.250.0080.00018.28
8.2.240.0120.00317.37
8.2.230.0040.00722.58
8.2.220.0050.00324.06
8.2.210.0050.00326.77
8.2.200.0030.00716.50
8.2.190.0040.01418.15
8.2.180.0030.01025.92
8.2.170.0070.01118.94
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00726.16
8.2.110.0090.00019.24
8.2.100.0060.00618.03
8.2.90.0030.00619.41
8.2.80.0000.00817.75
8.2.70.0000.00917.63
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0050.00319.34
8.2.30.0000.00818.00
8.2.20.0000.00819.19
8.2.10.0050.00318.07
8.2.00.0030.00519.34
8.1.330.0110.00816.11
8.1.320.0110.01016.01
8.1.310.0060.01016.32
8.1.300.0040.00418.31
8.1.290.0090.00030.84
8.1.280.0140.00025.92
8.1.270.0030.00624.66
8.1.260.0000.00728.09
8.1.250.0000.00728.09
8.1.240.0130.00322.14
8.1.230.0080.00422.58
8.1.220.0000.00817.78
8.1.210.0000.00818.97
8.1.200.0030.00617.47
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0030.00718.55
8.1.160.0040.00418.85
8.1.150.0070.00018.55
8.1.140.0000.00717.43
8.1.130.0070.00317.47
8.1.120.0150.00017.48
8.1.110.0090.00817.51
8.1.100.0140.00317.42
8.1.90.0110.00817.56
8.1.80.0050.01017.37
8.1.70.0180.00017.45
8.1.60.0030.01517.55
8.1.50.0090.00917.58
8.1.40.0140.00517.52
8.1.30.0180.00017.66
8.1.20.0170.00317.73
8.1.10.0080.01217.61
8.1.00.0120.00617.63
8.0.300.0000.00720.10
8.0.290.0000.00716.75
8.0.280.0030.00318.36
8.0.270.0070.00017.27
8.0.260.0040.01116.94
8.0.250.0110.00416.94
8.0.240.0070.00716.87
8.0.230.0070.00616.93
8.0.220.0000.01316.92
8.0.210.0080.00316.79
8.0.200.0120.00316.91
8.0.190.0080.00816.78
8.0.180.0080.00816.91
8.0.170.0100.00317.01
8.0.160.0100.00316.93
8.0.150.0070.00716.78
8.0.140.0140.00316.72
8.0.130.0160.00016.84
8.0.120.0090.00616.86
8.0.110.0070.01016.80
8.0.100.0090.00616.81
8.0.90.0030.01216.85
8.0.80.0000.01516.92
8.0.70.0070.00716.86
8.0.60.0070.00516.85
8.0.50.0110.00216.74
8.0.30.0140.00516.88
8.0.20.0110.00616.93
8.0.10.0100.00716.93

preferences:
109.56 ms | 403 KiB | 5 Q