Skip to content

Instantly share code, notes, and snippets.

@Charlie-Lucas
Created January 11, 2016 08:56
Show Gist options
  • Save Charlie-Lucas/550b1eb5e22ce98bd22d to your computer and use it in GitHub Desktop.
Save Charlie-Lucas/550b1eb5e22ce98bd22d to your computer and use it in GitHub Desktop.
<?php
public function unredislize($data)
{
$data = urldecode($data);
// unserialize data if we can
$unserializedData = @unserialize($data);
if($unserializedData !== false)
{
return $unserializedData;
}
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment