
[32/12/1999] Y2K bug sucessfully solved [?]
¡Añademe a tus favoritos!
Contacto
Post al azar
RSS
BUSCAR
Mapa de la web
Por
Saiyine
el 2006-10-25 02:50:27 - Secciones: - Enlace permanente: 711
Serialization is the process of converting some object into an easy to manage string, maintaining the ability of inverting the process and obtaining the object back from the string.
So, we could convert database rows into text lines in order to save the changes in a text file, save our program's objects when it ends and recover them at the next run, or create object persistence systems like caches.
With PHP is really easy, because we have the runtime function serialize:
<?
$vector["hola"]="Epa{}";
$vector["electric"]="Head";
print_r($vector);
$temporal=serialize($vector);
echo $temporal."\n";
$matrix=unserialize($temporal);
print_r($matrix);
?>
Output:
Array
(
[hola] => Epa{}
[electric] => Head
)
a:2:{s:4:"hola";s:5:"Epa{}";s:8:"electric";s:4:"Head";}
Array
(
[hola] => Epa{}
[electric] => Head
)
Otras entradas de la web que podrian interesarte:
. . .
. . .
. . .
. . .
Página web ©2001-2010 Saiyine generada en s, con 4639593 visitas en total, hoy (de un total de 0 previstas).
. . .