URL::__unset()

Deletes a URL data via property access.

Table of Contents
  1. Description
  2. Example

Description

URL::__unset(string $key): void;

This method will be called when you try to unset a property that doesn’t exist in the class. For this class, this method will set the property value to null.

Example

$url = new URL('http://127.0.0.1/foo/bar');

unset($url->path);

echo $url->path; // Returns `null`
echo $url; // Returns `'http://127.0.0.1'`

URL::__unset()

Deletes a URL data via property access.

URL::current()

Returns the full URL address along with its query and hash.