Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<SerializableSerializable::unserialize>
^SerializableLast updated: Mon, 26 Oct 2026

Serializable::serialize

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

Serializable::serialize — String representation of object

Description

public function Serializable::serialize(): ?string

Should return the string representation of the object.

Parameters

This function has no parameters.

Return Values

Returns the string representation of the object or null

Errors/Exceptions

Throws Exception when returning other types than strings and null.


<SerializableSerializable::unserialize>
^SerializableLast updated: Mon, 26 Oct 2026