Last active
February 9, 2019 01:29
-
-
Save saltandvinegarcrisps/f2abf620c7747c49119d 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
<?php | |
function mb_unserialize($string) { | |
$string = preg_replace_callback('#s:\d+:"(.*?)";#s', function($matches) { return sprintf('s:%d:"%s";', strlen($matches[1]), $matches[1]); }, $string); | |
return unserialize($string); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment