Skip to content

Instantly share code, notes, and snippets.

@AliN11
Last active June 26, 2019 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliN11/cf753f9b5b828be74f142f85ed06762c to your computer and use it in GitHub Desktop.
Save AliN11/cf753f9b5b828be74f142f85ed06762c to your computer and use it in GitHub Desktop.
<?php
class Sun
{
// ...
private function __sleep() {}
private function __wakeup() {}
};
$sun = new Sun;
$serialized = serialize($sun); // PHP Warning: ... cannot access private method Sun::__sleep()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment