Re: An BC issue in unserialize

From: Date: Thu, 17 Jul 2014 05:56:33 +0000
Subject: Re: An BC issue in unserialize
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-75637@lists.php.net to get a copy of this message
On Thu, Jul 17, 2014 at 1:09 PM, Remi Collet <remi@fedoraproject.org> wrote: > Le 17/07/2014 06:01, Laruence a écrit : > >> $this->_prototype = >> unserialize(sprintf('O:%d:"%s":0:{}', >> strlen($this->name), $this->name)); > >> I am not sure now. should this usage be supported? > > In think unserialize is an horrible hack which should have never be used. > > This is described in UPGRADINGS > > First, try to fix the code, using newInstanceWithoutConstructor() when > available (5.4+) and possible (userland classes) > Hey: serialize maybe a sensitive area, in my opinion we should very careful about the BC issue in such area.. if a user want to migrate it's codes from 5.5 to 5.6, but he has multi servers, he might want to migrate them one by one. in such case, the serialized data could be shared by 5.5 and 5.6... so... thanks > Remi. > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Laruence Xinchen Hui http://www.laruence.com/

« previous php.internals (#75637) next »