File::__unserialize()

Converts the serialized data back to its object.

Table of Contents
  1. Description
  2. Example

Description

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

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

Example

$file = unserialize('O:4:"File":1:{s:4:"path";s:18:".\path\to\file.txt";}');

echo $file->size; // Returns `'0 B'`

File::__unserialize()

Converts the serialized data back to its object.

File::size()

Gets the file sizes in human readable string format.