note 76012 added to function.unserialize

From: Date: Tue, 26 Jun 2007 17:42:50 +0000
Subject: note 76012 added to function.unserialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-127996@lists.php.net to get a copy of this message
props to steve at bluearena dot com and getmequick at gmail dot com Here's my implementation :p function mb_unserialize($serial_str) { $out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str ); return unserialize($out); } Works great for serialized UTF-8 content that doesn't like to be unserialized! ---- Server IP: 66.207.199.35 Probable Submitter: 206.191.52.229 ---- Manual Page -- http://www.php.net/manual/en/function.unserialize.php Edit -- https://master.php.net/note/edit/76012 Del: integrated -- https://master.php.net/note/delete/76012/integrated Del: useless -- https://master.php.net/note/delete/76012/useless Del: bad code -- https://master.php.net/note/delete/76012/bad+code Del: spam -- https://master.php.net/note/delete/76012/spam Del: non-english -- https://master.php.net/note/delete/76012/non-english Del: in docs -- https://master.php.net/note/delete/76012/in+docs Del: other reasons-- https://master.php.net/note/delete/76012 Reject -- https://master.php.net/note/reject/76012 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127996) next »