Re: PHP 4.0 Bug #2313: PHP4 unserializes a PHP3 serialized object as a boolean
| From: | Sascha Schumann | Date: | Thu, 16 Sep 1999 07:56:30 +0000 |
| Subject: | Re: PHP 4.0 Bug #2313: PHP4 unserializes a PHP3 serialized object as a boolean | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-10986@lists.php.net to get a copy of this message | ||
On Thu, Sep 16, 1999 at 03:14:23AM +0000, Manuel Lemos wrote:
> Hello Sascha,
>
> On 16-Sep-99 05:40:02, you wrote:
>
> >On Thu, Sep 16, 1999 at 12:15:29AM -0000, mlemos@acm.org wrote:
> >> From: mlemos@acm.org
> >> Operating system: LinuX RH 5.2
> >> PHP version: 4.0 Latest CVS (15/09/1999)
> >> PHP Bug Type: Misbehaving function
> >> Bug description: PHP4 unserializes a PHP3 serialized object as a boolean
> >>
> >> Try this example to see the problem.
>
> > The format is not written in stone and is subject to change.
>
> But isn't PHP4 going to be able to unserialize PHP3 serialized objects?
If PHP4 doesn't support PHP3's format, the answer is no.
> It's not my case, but I'm afraid that there is already many people storing
> PHP3 serialized data in databases. If PHP4 is not able to unserialize data
> serialized by PHP3, people's applications will break in PHP 4 and they
> might not want to move to PHP 4 because of that.
To do this, you would need to support PHP3's format in PHP4.
To differentiate between the formats, one could add a
version number to the data stream. Sounds like a project for
someone.
--
Regards,
Sascha Schumann
Consultant