Created
October 14, 2019 22:57
-
-
Save stevenseeley/864c1640e8ca99e4b30e17256b0ddcb9 to your computer and use it in GitHub Desktop.
This file contains 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
class hack implements Serializable{ | |
public function serialize() | |
{ | |
return json_encode(array( | |
$this->name, | |
$this->data | |
)); | |
} | |
public function unserialize($data) | |
{ | |
list($this->name, $this->data) = json_decode($data, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment