Hướng dẫn dùng anatomy means trong PHP
(PHP 4, PHP 5, PHP 7, PHP 8) serialize — Generates a storable representation of a value Descriptionserialize(mixed This is useful for storing or passing PHP values around without losing their type and structure. To make the serialized string into a PHP value again, use unserialize(). Parametersvalue The value to be serialized. serialize() handles all types, except the resource-type and some objects (see note below). You can even serialize() arrays that contain references to itself. Circular references inside the array/object you are serializing will also be stored. Any other reference will be lost. When serializing objects, PHP will attempt to call the member functions __serialize() or __sleep() prior to serialization. This is to allow the object to do any last minute clean-up, etc. prior to being serialized. Likewise, when the object is restored using unserialize() the __unserialize() or __wakeup() member function is called.
Return Values Returns a string containing a byte-stream representation of Note that this is a binary string which may include null bytes, and needs to be stored and handled as such. For example, serialize() output should generally be stored in a BLOB field in a database, rather than a CHAR or TEXT field. ExamplesExample #1 serialize() example
Notes
Warning When serialize() serializes objects, the leading backslash is not included in the class name of namespaced classes for maximum compatibility. See Also
egingell at sisna dot com ¶ 16 years ago
Anonymous ¶ 10 years ago
Kantin Charignon ¶ 4 years ago
MiChAeLoKGB ¶ 7 years ago
testSpeed($testArray, $iterations = 100){$json_time = array(); nh at ngin dot de ¶ 9 years ago
MC_Gurk at gmx dot net ¶ 16 years ago
hfuecks at phppatterns dot com ¶ 18 years ago
frost at easycast dot ru ¶ 8 years ago
Andrew B ¶ 10 years ago
barbuj at NOSPAM dot yahoo dot com ¶ 14 years ago
display() { pli9 at itsa dot ucsf dot edu ¶ 19 years ago
wiart at yahoo dot com ¶ 17 years ago
Anonymous ¶ 5 years ago
= array('Lorem ipsum dolor sit amet', 8726348723, true);$packer = new ArraysPack();
Alexander Podgorny ¶ 16 years ago
/**********************/
synnus ¶ 9 months ago
implode($dlim,$list); stephen dot adamson at smius dot com ¶ 16 years ago
Nanhe Kumar ¶ 8 years ago
$name; travis at travishegner dot com ¶ 12 years ago
= serialize($my_object);
Anonymous ¶ 12 years ago
Jeex ¶ 14 years ago
paul at moveNOtoSPAMiceland DOT com ¶ 17 years ago
sinus-php at sinpi dot net ¶ 5 years ago
Alessandro Segala ¶ 13 years ago
lincoln dot du dot j at gmail dot com ¶ 5 years ago
Ates Goral ¶ 16 years ago
MarkRoedel at letu dot edu ¶ 22 years ago
donotmail at me dot com ¶ 13 years ago
"\n-----------------------\n";
$tmp[1][0] = "blah";
print_r($tmp);
?>
allan666 at gmail.com ¶ 9 years ago
pgl at yoyo dot org ¶ 11 years ago
friday13 at ig dot com dot br ¶ 15 years ago
tuxedobob ¶ 8 years ago
|