each() returns a array($key, $value) pair, not the whole array (that would be function id($a) { return $a; }). Basically,

Code:
foreach ($a as $k => $v) {
  // ...
}
expands to:

Code:
while (list($k, $v) = each($a)) {
  // ...
}