Skip to content

Instantly share code, notes, and snippets.

@jiri-jagos
Created September 30, 2015 14:48
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 jiri-jagos/838dbb9336cb09854c0d to your computer and use it in GitHub Desktop.
Save jiri-jagos/838dbb9336cb09854c0d to your computer and use it in GitHub Desktop.
unserialize hack
$object = @unserialize(sprintf('O:%d:"%s":0:{}', strlen($className), $className));
if ($object === false) {
$object = unserialize(sprintf('C:%d:"%s":0:{}', strlen($className), $className));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment