import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-serialize / serialization_objects_004.php
blobc2c4d2f4414f9f489f8d1901f4044c1b8009ad3d
1 <?php
2 /* Prototype : proto string serialize(mixed variable)
3 * Description: Returns a string representation of variable (which can later be unserialized)
4 * Source code: ext/standard/var.c
5 * Alias to functions:
6 */
7 /* Prototype : proto mixed unserialize(string variable_representation)
8 * Description: Takes a string representation of variable and recreates it
9 * Source code: ext/standard/var.c
10 * Alias to functions:
13 $x = new stdClass;
14 $ref = &$x;
15 var_dump(serialize(array($x, $x)));
17 $x = 1;
18 $ref = &$x;
19 var_dump(serialize(array($x, $x)));
21 $x = "a";
22 $ref = &$x;
23 var_dump(serialize(array($x, $x)));
25 $x = true;
26 $ref = &$x;
27 var_dump(serialize(array($x, $x)));
29 $x = null;
30 $ref = &$x;
31 var_dump(serialize(array($x, $x)));
33 $x = array();
34 $ref = &$x;
35 var_dump(serialize(array($x, $x)));
37 echo "Done";