Open In App

PHP | ArrayObject serialize() Function

Last Updated : 27 Sep, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The ArrayObject::serialize() function is an inbuilt function in PHP which is used to serialize the ArrayObject. Syntax:
string ArrayObject::serialize( void )
Parameters: This function does not accept any parameters. Return Value: This function returns the serialized representation of the ArrayObject. Below program illustrates the ArrayObject::serialize() function in PHP: Program:
Output:
string(113) "C:11:"ArrayObject":89:{
    x:i:0;a:3:{
        s:1:"a";s:7:"Welcome";
        s:1:"b";s:2:"to";
        s:1:"c";s:13:"GeeksforGeeks";
    }
    ;m:a:0:{}
}"
string(89) "x:i:0;a:3 {
    s:1:"a";s:7:"Welcome";
    s:1:"b";s:2:"to";
    s:1:"c";s:13:"GeeksforGeeks";
};m:a:0:{}"
Reference: https://www.php.net/manual/en/arrayobject.serialize.php

Next Article

Similar Reads