$hash = \Nette\Utils\ArrayHash::from([1 => 1, 2=> 2, 3=> 3]);
foreach($hash as $key => $value) {
unset($hash[$key]);
}
dump($hash);
Output is:
Nette\Utils\ArrayHash #3f75
2 => 2
I'm not sure, is it bug (in php?) or it's just not supported and I'm using it wrong?