Serialize an ArrayObject with ArrayObject::serialize in PHP
Description
The following code shows how to serialize an ArrayObject with ArrayObject::serialize.
Example
//example revised from php.net/*ww w . ja v a2s .co m*/
<?php
$o = new ArrayObject();
$s1 = serialize($o);
$s2 = $o->serialize();
var_dump($s1);
var_dump($s2);
?>
The code above generates the following result.