Created
November 9, 2016 09:23
-
-
Save gorkamu/ff9fe51208d71a9da53eff56b41703ce to your computer and use it in GitHub Desktop.
Ejemplo de serialización y deserialización de objetos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Gorkamu | |
{ | |
public $nombre = 'Gorkamu'; | |
public $web = 'http://www.gorkamu.com'; | |
} | |
$gorkamu = new Gorkamu(); | |
$serialize = serialize($gorkamu); | |
echo $serialize.PHP_EOL; | |
$gorkamu = unserialize($serialize); | |
var_dump($gorkamu); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment