public function getLastLocation() { if (preg_match('~Location: (.+)~i', $this->lastHeader, $matches)) { return trim($matches[1]); } return null; }