DT
Size: a a a
DT
A
A
DT
function doSmth(array<Type> $types) {
foreach($types as $type) {
$result[(string)$type] = [];
}
return $result;
}DT
['apples', 'bananas'] и точно получу ['apples' => [], 'bananas' => []] как минимумDT
$types === array_key($result)A
function doSmth(array<Type> $types) {
foreach($types as $type) {
$result[(string)$type] = [];
}
return $result;
}AK
DT
T всегда Type в моем случае)DT
A
DT
['apples', 'bananas'] и точно получу ['apples' => [], 'bananas' => []] как минимумA
A
['apples', 'bananas'] и точно получу ['apples' => [], 'bananas' => []] как минимумDT
АМ
BT
АМ
A