mirror of
https://github.com/php/php-src.git
synced 2024-10-01 06:46:08 +00:00
e7a6c15b93
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.
40 lines
456 B
PHP
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===
|
|
|