|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-12-11 13:51 UTC] remi@php.net
Description:
------------
Seems a regression between 5.4.9 and 5.5.0-dev
This breaks Archive_Tar
Test script:
---------------
<?php
$a="AB\x00\x00";
var_dump($a);
var_dump(unpack("a4foo", $a));
Expected result:
----------------
With php 5.4.9:
string(4) "AB^@^@"
array(1) {
["foo"]=>
string(2) "AB"
}
Actual result:
--------------
With php 5.5.0-dev:
string(4) "AB^@^@"
array(1) {
["foo"]=>
string(4) "AB^@^@"
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 00:00:01 2025 UTC |
There still a problem with new 'z' format: php -r '$a="\x00\x00\x00\x00"; var_dump($a); var_dump(unpack("Z4foo", $a));' Actual result: string(4) "^@^@^@^@" array(1) { ["foo"]=> string(1) "^@" } When we expect: string(4) "^@^@^@^@" array(1) { ["foo"]=> string(0) "" }