CodeExplorer is_expired example
public function before_request($url, &
$headers, &
$data, &
$type, &
$options) { if (!
$url instanceof Iri
) { $url =
new Iri($url);
} if (!
empty($this->cookies
)) { $cookies =
[];
foreach ($this->cookies
as $key =>
$cookie) { $cookie =
$this->
normalize_cookie($cookie,
$key);
// Skip expired cookies
if ($cookie->
is_expired()) { continue;
} if ($cookie->
domain_matches($url->host
)) { $cookies[] =
$cookie->
format_for_header();
} } $headers['Cookie'
] =
implode('; ',
$cookies);
} }