Serializable::serialize
PHP function
Edit on GitHub ✎
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
String representation of object
Description
Serializable::serialize(): string|null
Should return the string representation of the object.
Parameters Parameters
Return Values
Returns the string representation of the object or null
Errors/Exceptions
Throws Exception when returning other types than strings and null.