note 89739 added to function.serialize

From: Date: Fri, 20 Mar 2009 20:54:01 +0000
Subject: note 89739 added to function.serialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-152233@lists.php.net to get a copy of this message
<?php class Test { private $test; function __construct($t){ $this->test=$t; } } $test1=new Test('F:\alpha'); $test2=new Test('F:/alpha'); $ser1=serialize($tets1); $ser2=serialize($test2); print_r(unserialize($ser1)); print_r(unserialize($ser2)); ?> This is a simple problem. unserialize failed on $ser1 (because of '\' char. any '\' char any where in object , make unserialize to fail) I found this when I check my script on a windows system. ---- Server IP: 69.147.83.197 Probable Submitter: 80.191.235.166 ---- Manual Page -- http://www.php.net/manual/en/function.serialize.php Edit -- https://master.php.net/note/edit/89739 Del: integrated -- https://master.php.net/note/delete/89739/integrated Del: useless -- https://master.php.net/note/delete/89739/useless Del: bad code -- https://master.php.net/note/delete/89739/bad+code Del: spam -- https://master.php.net/note/delete/89739/spam Del: non-english -- https://master.php.net/note/delete/89739/non-english Del: in docs -- https://master.php.net/note/delete/89739/in+docs Del: other reasons-- https://master.php.net/note/delete/89739 Reject -- https://master.php.net/note/reject/89739 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152233) next »