Created
October 10, 2012 13:58
-
-
Save tagrudev/3865808 to your computer and use it in GitHub Desktop.
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
/** | |
* Mulit-byte Unserialize | |
* | |
* UTF-8 will screw up a serialized string | |
* | |
* @access private | |
* @param string | |
* @return string | |
*/ | |
function mb_unserialize($string) { | |
$string = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $string); | |
return unserialize($string); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment