TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
473 B

--TEST--
Bug #36148 (unpack("H*hex", $data) is adding an extra character to the end of the string)
--FILE--
<?php
$values = array("a", "aa", "aaa", "aaaa");
foreach ($values as $value) {
$a = pack("H*", $value);
$b = unpack("H*", $a);
echo $value.": ";
var_dump($b);
}
?>
--EXPECT--
a: array(1) {
[1]=>
string(2) "a0"
}
aa: array(1) {
[1]=>
string(2) "aa"
}
aaa: array(1) {
[1]=>
string(4) "aaa0"
}
aaaa: array(1) {
[1]=>
string(4) "aaaa"
}