3v4l.org

run code in 500+ PHP versions simultaneously
<?php Class Unit{ public function __construct(public readonly ?string $name){} } Class Branch{ public array $units = []; public function __construct(public readonly ?string $name){} } Class Group{ public array $branches = []; public function __construct(public readonly string $name){} } $sampleData = [ ['g1', 'b1', null], ['g1', 'b1', 'u2'], ['g2', null, 'u3'], ['g2', 'b6', 'u4'], ['g3', 'b7', 'u5'], ]; $groups = []; foreach($sampleData as $row){ $groupId = $row[0]; $branchId = $row[1]; $unitId = $row[2]; if(!isset($groups[$groupId])){ $groups[$groupId] = new Group($groupId); } if(!isset($groups[$groupId]->branches[$branchId])){ $groups[$groupId]->branches[$branchId] = new Branch($branchId); } if(!isset($groups[$groupId]->branches[$branchId]->units[$unitId])){ $groups[$groupId]->branches[$branchId]->units[$unitId] = new Unit($unitId); } } var_dump($groups);

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.30.0090.00919.41
8.5.20.0100.00819.46
8.5.10.0100.00920.14
8.5.00.0130.01020.07
8.4.180.0160.00919.75
8.4.170.0150.00721.99
8.4.160.0170.00622.19
8.4.150.0050.00716.89
8.4.140.0140.00817.45
8.4.130.0110.01019.42
8.4.120.0050.00320.56
8.4.110.0090.01222.61
8.4.100.0120.00917.93
8.4.90.0130.00720.63
8.4.80.0160.00517.91
8.4.70.0130.00817.77
8.4.60.0130.00918.68
8.4.50.0120.01020.24
8.4.40.0090.01219.26
8.4.30.0100.01018.62
8.4.20.0090.01219.81
8.4.10.0070.01423.92
8.3.300.0100.01318.27
8.3.290.0140.00620.72
8.3.280.0090.01118.41
8.3.270.0120.01016.73
8.3.260.0060.00316.47
8.3.250.0110.00918.89
8.3.240.0110.00918.97
8.3.230.0120.00816.69
8.3.220.0140.00420.65
8.3.210.0100.00818.35
8.3.200.0050.00416.50
8.3.190.0070.00717.09
8.3.180.0040.00416.81
8.3.170.0040.01517.23
8.3.160.0080.01118.59
8.3.150.0060.01318.37
8.3.140.0000.00917.08
8.3.130.0060.01316.56
8.3.120.0120.00919.01
8.3.110.0070.01316.81
8.3.100.0030.00616.62
8.3.90.0130.00716.58
8.3.50.0070.01016.50
8.2.300.0150.00622.33
8.2.290.0110.00420.25
8.2.280.0110.00718.36
8.2.270.0040.00417.06
8.2.260.0050.00516.60
8.2.250.0080.00018.41
8.2.240.0040.00417.29
8.2.230.0180.00320.94
8.2.220.0080.00016.68
8.2.210.0080.00016.43
8.1.340.0150.00823.72
8.1.330.0100.00823.69
8.1.320.0130.00616.11
8.1.310.0030.00618.29
8.1.300.0120.00615.94
8.1.130.0050.00518.65

preferences:
43.72 ms | 827 KiB | 5 Q