public function detachFirst() { $this->rewind(); $o = $this->current(); if (!$o) { return false; } $this->detach($o); return $o; }