etagMatches.php
Table of Contents
Functions
- etagMatches() : bool
- Tells whether an `If-None-Match` header value matches a given `ETag`.
Functions
etagMatches()
Tells whether an `If-None-Match` header value matches a given `ETag`.
etagMatches(string $header, string $etag) : bool
Implements the RFC 7232 §3.2 semantics used for If-None-Match:
*matches any current representation;- otherwise the header is a comma-separated list of entity tags, compared with the
weak comparison function — the
W/prefix is ignored on both sides, soW/"x"and"x"are considered a match.
Parameters
- $header : string
-
The raw
If-None-Matchheader value. - $etag : string
-
The current
ETagof the resource (as produced by computeETag()).
Tags
Return values
bool —true when the precondition matches (the caller should answer 304 Not Modified).