php-src/ext/standard/tests/strings/unpack_bug68225.phpt
Anatol Belski e7a6c15b93 Fixed bug #68225 unpack and X format code
This is done by reverting some parts to the state of pre 7, whereby
that means all the size_t potential isn't exhausted. This might be
a subject of the subsequent fix, the functionality can be ensured
with the supplied test.
2014-11-28 10:22:03 +01:00

40 lines
456 B
PHP

--TEST--
Bug #68225 unpack and X format code
--FILE--
<?php
$data = pack('VV', 1, 2);
$result = unpack('Va/X' ,$data);
var_dump($result);
$result = unpack('Va/X4' ,$data);
var_dump($result);
$result = unpack('V1a/X4/V1b/V1c/X4/V1d', $data);
var_dump($result);
?>
===DONE===
--EXPECTF--
array(1) {
["a"]=>
int(1)
}
array(1) {
["a"]=>
int(1)
}
array(4) {
["a"]=>
int(1)
["b"]=>
int(1)
["c"]=>
int(2)
["d"]=>
int(2)
}
===DONE===