--- layout: default title: URI references redirect_from: - /5.0/manipulations/references/ --- URI references ======= ## is_absolute
The `is_absolute` function tells whether the given URI object represents an absolute URI. ~~~php available since version1.1.0
The `is_absolute_path` function tells whether the given URI object represents an absolute URI path.
~~~php
available since version 1.1.0
The `is_network_path` function tells whether the given URI object represents an network path URI.
~~~php
available since version 1.1.0
The `is_relative_path` function tells whether the given URI object represents a relative path.
~~~php
available since version 1.1.0
The `is_same_document` function tells whether the given URI object represents the same document.
~~~php
this function is deprecated as of version 1.1.0 and will be remove in the next major release.
This function analyzes the submitted URI object and returns an associative array containing information regarding the URI-reference as per [RFC3986](https://tools.ietf.org/html/rfc3986#section-4.1).
### Parameters
- `$uri` implements `Psr\Http\Message\UriInterface` or `League\Uri\Interfaces\Uri`
- `$base_uri` optional, implements `Psr\Http\Message\UriInterface` or `League\Uri\Interfaces\Uri`. Required if you want to detect same document reference.
### Returns Values
An associative array is returned. The following keys are always present within the array and their content is always a boolean:
- `absolute_uri`
- `network_path`
- `absolute_path`
- `relative_path`
- `same_document`
~~~php
bool(false)
// 'network_path' => bool(true)
// 'absolute_path' => bool(false)
// 'relative_path' => bool(false)
// 'same_document' => bool(false)
// }
var_dump(uri_reference($guzzle_uri, $alt_uri));
//displays
// array(5) {
// 'absolute_uri' => bool(false)
// 'network_path' => bool(true)
// 'absolute_path' => bool(false)
// 'relative_path' => bool(false)
// 'same_document' => bool(true) //can be true only if a base URI is provided
// }
~~~