Change language

PHP ArrayObject unserialize () function

Syntax:
void ArrayObject::unserialize (string $serialized)
Parameters:This function takes one parameter, $serialized,which contains a serialized ArrayObject.Return value:This function returns an unserialized ArrayObject.The following program illustrates the ArrayObject::unserialize() function in PHP:Program :
// PHP illustration program
// ArrayObject::unserialize() function 
// Declare associative array $arr = array ( "a" = > "Welcome" , "b" = > "to" , "c" = > "GeeksforGeeks");  
// Create array object $arrObject = new ArrayObject ( $arr );  
// Using the ArrayObject::serialize() function $serialize1 = serialize ( $arrObject );  
// Using the ArrayObject::unserialize() function $serialize2 = unserialize ( $serialize1 );  
// Show result var_dump ( $serialize1 ); var_dump ( $serialize2 );  
?>
Exit:
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"}}
Link: https : //www.php.net/manual/en/arrayobject.unserialize.php

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method