Skip to content

Instantly share code, notes, and snippets.

View bpacholek's full-sized avatar

Bartosz Pachołek bpacholek

View GitHub Profile
<?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);
}