note 84730 added to function.unserialize

From: Date: Sun, 27 Jul 2008 23:24:03 +0000
Subject: note 84730 added to function.unserialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-142829@lists.php.net to get a copy of this message
@ Igor for single quote trouble: function mb_unserialize($serial_str) { $out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str ); return unserialize($out); } Unserialize with utf8 content get trouble and the code provided by the guy works fine. Code isn't mine: thanks to http://www.lastfm.pl/user/TheMariner ---- Server IP: 213.92.11.19 Probable Submitter: 151.48.163.107 ---- Manual Page -- http://www.php.net/manual/en/function.unserialize.php Edit -- https://master.php.net/note/edit/84730 Del: integrated -- https://master.php.net/note/delete/84730/integrated Del: useless -- https://master.php.net/note/delete/84730/useless Del: bad code -- https://master.php.net/note/delete/84730/bad+code Del: spam -- https://master.php.net/note/delete/84730/spam Del: non-english -- https://master.php.net/note/delete/84730/non-english Del: in docs -- https://master.php.net/note/delete/84730/in+docs Del: other reasons-- https://master.php.net/note/delete/84730 Reject -- https://master.php.net/note/reject/84730 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#142829) next »