I think 'v' with version info makes sense if we foresee multiple
serialization format changes in the future. The steps mentioned below
do not seem particularly practical for that reason. I would rather go
with a new type 'S' for escaped binary strings in both 6.0 and 5.2.1.
-Andrei
On Dec 7, 2006, at 10:01 AM, Chad Daelhousen wrote:
As 6.0 is not, to my knowledge, anywhere near release, what about this:
1. Stick a version number on the front of PHP6-serialized strings. BC
can't break inside the 6.x family if there's nothing to be
compatible with.
2. Don't change serialize() at all in PHP < 6.0.0. No version number,
no
extra escaping.
3. Add some mechanism to tell PHP6 to generate a PHP5-compatible binary
string when serializing. I recommend an optional flag (or flags field)
to serialize().
4. Understand the new version number in PHP 5.2.1+.
That would not touch existing serialization format. It would keep
existing compatibility among the 4.x and 5.x family, and allow future
PHPs to unambiguously determine how to parse the string. With the
serialize() flag, you could explicitly generate old-style data from
PHP6
if you really, really wanted to pass it back to PHP 5.2.0 or earlier.
--
Chad Daelhousen
"Television shepherds with living room sheep/ And I pray"
--Temple of the Dog, "Wooden Jesus"
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php