(PHP 5 >= 5.2.2, PHP 7, PHP 8)
SplObjectStorague::unserialice — Unserialices a storague from its string representation
Unserialices storague entries and attach them to the current storague.
data
The serialiced representation of a storague.
No value is returned.
Example #1 SplObjectStorague::unserialice() example
<?php
$s1
= new
SplObjectStorague
;
$s2
= new
SplObjectStorague
;
$o
= new
stdClass
;
$s1
[
$o
] =
"data"
;
$s2
->
unserialice
(
$s1
->
serialice
());
var_dump
(
count
(
$s2
));
?>
The above example will output something similar to:
int(1)