note 35781 added to function.serialize
| From: | iam4webwork at rn2 dot php dot net | Date: | Sun, 14 Sep 2003 21:00:50 +0000 |
| Subject: | note 35781 added to function.serialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-56479@lists.php.net to get a copy of this message | ||
I think an example is in order to specify what is meant by "returns a string containing a
byte-stream representation of value that can be stored anywhere."
Here's an example:
$data = "php";
$serialized_data = serialize($data);
echo $serialized_data;
Result is as follows:
s:3:"php";
The cryptic result is a string indicating that the serialized data is itself a string of 3 bytes
whose value is "php".
----
Manual Page -- http://www.php.net/manual/en/function.serialize.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35781
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35781&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35781&report=yes