note 35781 modified in function.serialize by aidan
| From: | aidan@php.net | Date: | Thu, 24 Jun 2004 10:17:58 +0000 |
| Subject: | note 35781 modified in function.serialize by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71574@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:
<?php
echo serialize("php");
?>
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".
--was--
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".
http://php.net/manual/en/function.serialize.php