svn: /phpdoc/en/trunk/reference/var/functions/ serialize.xml
| From: | Adam Harvey | Date: | Tue, 06 Nov 2012 01:57:21 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/var/functions/ serialize.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-10659@lists.php.net to get a copy of this message | ||
aharvey Tue, 06 Nov 2012 01:57:21 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=328245
Log:
Elaborate that the return value of serialize() is a binary string, rather than
a non-binary one, and that storing it in a textual database field may not go
very well. (This deals with the other common note on the unserialize() page.)
Changed paths:
U phpdoc/en/trunk/reference/var/functions/serialize.xml
Modified: phpdoc/en/trunk/reference/var/functions/serialize.xml
===================================================================
--- phpdoc/en/trunk/reference/var/functions/serialize.xml 2012-11-06 01:29:54 UTC (rev 328244)
+++ phpdoc/en/trunk/reference/var/functions/serialize.xml 2012-11-06 01:57:21 UTC (rev 328245)
@@ -13,7 +13,7 @@
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
</methodsynopsis>
<para>
- Generates a storable representation of a value
+ Generates a storable representation of a value.
</para>
<para>
This is useful for storing or passing PHP values around without
@@ -66,6 +66,12 @@
Returns a string containing a byte-stream representation of
<parameter>value</parameter> that can be stored anywhere.
</para>
+ <para>
+ Note that this is a binary string which may include null bytes, and needs
+ to be stored and handled as such. For example,
+ <function>serialize</function> output should generally be stored in a BLOB
+ field in a database, rather than a CHAR or TEXT field.
+ </para>
</refsect1>
<refsect1 role="examples">