Re: PHP-5.5 unpack change broke pecl/pear
| From: | Sherif Ramadan | Date: | Mon, 24 Dec 2012 04:11:45 +0000 |
| Subject: | Re: PHP-5.5 unpack change broke pecl/pear | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64418@lists.php.net to get a copy of this message | ||
This change does not break BC.
The "a" format in pack/unpack functions has not changed at all in 5.5. It
still does the same thing and it was not replaced by the new "Z" format
option, which I added. They do different things.
The "a" format strips null bytes from the string.
The new "Z" format in 5.5 truncates the string at the first null-byte,
returning everything prior to it.
pack/unpack functions should still be backwards-compatible with PHP < 5.5.