PHP | ArrayObject unserialize() Function Last Updated : 27 Sep, 2019 Comments Improve Suggest changes Like Article Like Report The ArrayObject::unserialize() function is an inbuilt function in PHP which is used to unserializes the serialized ArrayObject. Syntax: void ArrayObject::unserialize( string $serialized ) Parameters: This function accepts single parameter $serialized which holds the serialized ArrayObject. Return Value: This function returns the unserialized ArrayObject. Below program illustrates the ArrayObject::unserialize() function in PHP: Program: php <?php // PHP program to illustrate the // ArrayObject::unserialize() function // Declare an associative array $arr = array( "a" => "Welcome", "b" => "to", "c" => "GeeksforGeeks" ); // Create array object $arrObject = new ArrayObject($arr); // Use ArrayObject::serialize() function $serialize1 = serialize($arrObject); // Use ArrayObject::unserialize() function $serialize2 = unserialize($serialize1); // Display the result var_dump($serialize1); var_dump($serialize2); ?> 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:{} }" object(ArrayObject)#2 (1) { ["storage":"ArrayObject":private]=> array(3) { ["a"]=> string(7) "Welcome" ["b"]=> string(2) "to" ["c"]=> string(13) "GeeksforGeeks" } } Reference: https://www.php.net/manual/en/arrayobject.unserialize.php Comment More infoAdvertise with us Next Article PHP | ArrayObject unserialize() Function jit_t Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-ArrayObject Similar Reads PHP | ArrayObject serialize() Function 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 1 min read PHP | ArrayIterator unserialize() Function The ArrayIterator::unserialize() function is an inbuilt function in PHP which is used to unserialize the serialize object. Syntax: void ArrayIterator::unserialize( string $serialized ) Parameters: This function accepts single parameter $serialized which holds the serialize array iterator object. Ret 2 min read PHP | ArrayIterator serialize() Function The ArrayIterator::serialize() function is an inbuilt function in PHP which is used to serialize the array iterator. Syntax: string ArrayIterator::serialize( void ) Parameters: This function does not accept any parameters. Return Value: This function returns the serialized ArrayIterator. Below progr 1 min read PHP ArrayObject setFlags() Function The ArrayObject::setFlags() function is an inbuilt function in PHP that is used to set the flag to change the behavior of the ArrayObject. Syntax: void ArrayObject::setFlags( int $flags ) Parameters: This function accepts single parameter $flags which hold the behavior of new ArrayObject. This param 2 min read ArrayObject uksort() Function in PHP The uksort() function of the ArrayObject class in PHP is used to sort the entries present in the ArrayObject according to the keys following a user-defined function. They key-value mapping is preserved after sorting the ArrayObject. Syntax: void uksort($comparator) Parameters: This function accepts 2 min read ArrayObject uasort() Function in PHP The uasort() function of the ArrayObject class in PHP is used to sort values of an ArrayObject according to a user defined comparison function. The function compares and arranges the values present in the ArrayObject according to the given comparison function. This method does not affects the key-va 2 min read PHP | ArrayObject setIteratorClass() Function The ArrayObject::setIteratorClass() function is an inbuilt function in PHP which is used to set the iterator classname for the ArrayObject. Syntax: void ArrayObject::setIteratorClass( string $iterator_class ) Parameters: This function accepts single parameter $iterator_class which holds the class na 2 min read PHP array_unique() Function The PHP array_unique() function removes duplicate values from an array, preserving the first occurrence of each value and reindexing the array with keys preserved. It's useful for filtering out redundant data and ensuring a collection of unique elements within an array. Syntaxarray array_unique($arr 2 min read PHP array_unshift() Function This inbuilt function of PHP is used to add one or more elements into an array and these elements are added to at the beginning of the array. All the elements that we add into the array are inserted in the same order, as they have been passed. They are numerically indexed starting from the 0th posit 3 min read PHP | ArrayObject count() Function The ArrayObject::count() function is an inbuilt function in PHP which is used to get the number of public properties in the ArrayObject. Syntax: int ArrayObject::count( void ) Parameters: This function does not accept any parameters. Return Value: This function returns the number of public propertie 1 min read Like