URL::__unserialize()

Converts the serialized data back to its object.

Table of Contents
  1. Description
  2. Example

Description

URL::__unserialize(array $lot): void;

This method will be called when the serialized data is successfully returned into a URL instance using the built-in PHP unserialize() function.

Example

$url = unserialize('O:3:"URL":1:{s:3:"lot";a:6:{s:4:"hash";s:1:"e";s:4:"host";s:9:"127.0.0.1";s:4:"path";s:3:"a/b";s:4:"port";N;s:8:"protocol";s:4:"http";s:5:"query";s:3:"c=d";}}');

echo $url->hash; // Returns `'#e'`

URL::__unserialize()

Converts the serialized data back to its object.

URL::current()

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