/PHP-8.1/ext/standard/tests/strings/ |
H A D | pack.phpt | 2 Generic pack()/unpack() tests 16 print_r(unpack("C", pack("C", -127))); 17 print_r(unpack("C", pack("C", 127))); 18 print_r(unpack("C", pack("C", 255))); 19 print_r(unpack("C", pack("C", -129))); 21 print_r(unpack("H", pack("H", 0x04))); 24 print_r(unpack("I", pack("I", 0))); 31 print_r(unpack("L", pack("L", 0))); 37 print_r(unpack("N", pack("N", 0))); 45 print_r(unpack("S", pack("S", 0))); [all …]
|
H A D | pack64.phpt | 2 64bit pack()/unpack() tests 11 print_r(unpack("Q", pack("Q", 0xfffffffffffe))); 12 print_r(unpack("Q", pack("Q", 0))); 14 print_r(unpack("Q", pack("Q", -1))); 17 print_r(unpack("J", pack("J", 0xfffffffffffe))); 18 print_r(unpack("J", pack("J", 0))); 20 print_r(unpack("J", pack("J", -1))); 24 print_r(unpack("P", pack("P", 0))); 26 print_r(unpack("P", pack("P", -1))); 30 print_r(unpack("q", pack("q", 0))); [all …]
|
H A D | pack_float.phpt | 2 pack()/unpack(): float/double tests 74 'unpack e', 84 'unpack E', 94 'unpack g', 95 unpack('g', hex2bin('0000803f')), 104 'unpack G', 112 unpack('G', hex2bin('df2b54aa')) 181 string(8) "unpack e" 214 string(8) "unpack E" 247 string(8) "unpack g" [all …]
|
H A D | pack_Z.phpt | 2 pack()/unpack(): "Z" format 11 unpack("Z*", "foo\0\rbar\0 \t\r\n"), 12 unpack("Z9", "foo\0\rbar\0 \t\r\n"), 13 unpack("Z2", "\0"), 14 unpack("Z2", "\0\0"), 15 unpack("Z2", "A\0"), 16 unpack("Z2", "AB\0"), 17 unpack("Z2", "ABC") 21 Warning: unpack(): Type Z: not enough input, need 2, have 1 in %s on line %d
|
H A D | unpack_offset.phpt | 2 unpack() with offset 7 $a = unpack("l2", $data, 3); 11 unpack("l", $data, 3)[1], 12 unpack("@4/l", $data, 3)[1]); 15 unpack("l", "foo", 10); 20 unpack("l", "foo", -1); 28 unpack(): Argument #3 ($offset) must be contained in argument #2 ($data) 29 unpack(): Argument #3 ($offset) must be contained in argument #2 ($data)
|
H A D | pack_arrays.phpt | 2 test unpack() to array with named keys 6 print_r(unpack('Vaa/Vbb/Vcc', $str)); 7 print_r(unpack('V2aa/Vcc', $str)); 8 print_r(unpack('V3aa', $str)); 9 print_r(unpack('V*aa', $str)); 10 print_r(unpack('V*', $str));
|
H A D | bug61038.phpt | 2 Bug #61038: unpack("a5", "str\0\0") does not work as expected 5 var_dump(unpack("a4", "str\0\0")); 6 var_dump(unpack("a5", "str\0\0")); 7 var_dump(unpack("a6", "str\0\0")); 8 var_dump(unpack("a*", "str\0\0")); 20 Warning: unpack(): Type a: not enough input, need 6, have 5 in %s on line %d
|
H A D | bug35817.phpt | 2 Bug #35817 (unpack() does not decode odd number of hexadecimal values) 6 $b = unpack("H3", $a); 10 $b = unpack("H2", $a); 14 $b = unpack("H", $a);
|
H A D | unpack_bug68225.phpt | 2 Bug #68225 unpack and X format code 8 $result = unpack('Va/X' ,$data); 11 $result = unpack('Va/X4' ,$data); 14 $result = unpack('V1a/X4/V1b/V1c/X4/V1d', $data);
|
H A D | bug75075.phpt | 2 Bug #75075 (unpack with X* causes infinity loop) 5 var_dump(unpack("X*", "")); 8 Warning: unpack(): Type X: '*' ignored in %sbug75075.php on line %d
|
H A D | bug69522.phpt | 2 Bug #69522 (heap buffer overflow in unpack()) 6 $b = unpack('h2147483648', $a); 9 Warning: unpack(): Type h: integer overflow in %s on line %d
|
H A D | pack_A.phpt | 2 pack()/unpack(): "A" modifier 9 unpack("A*", "foo\0\rbar\0 \t\r\n"), 10 unpack("A4", "foo\0\rbar\0 \t\r\n")
|
H A D | pack64_32.phpt | 2 64bit pack()/unpack() tests 33 var_dump(unpack("Q", '')); 38 var_dump(unpack("J", '')); 43 var_dump(unpack("P", '')); 48 var_dump(unpack("q", ''));
|
H A D | unpack_error.phpt | 2 Test unpack() function : error conditions 7 var_dump(unpack("B", pack("I", 65534)));
|
H A D | gh10940.phpt | 6 unpack('h2147483647', $a); 9 Warning: unpack(): Type h: not enough input, need 1073741824, have 12 in %s on line %d
|
H A D | bug38770.phpt | 2 Bug #38770 (unpack() broken with longs on 64 bit machines) 11 print_r(unpack($v, pack($v, -30000)));
|
H A D | bug36148.phpt | 2 Bug #36148 (unpack("H*hex", $data) is adding an extra character to the end of the string) 8 $b = unpack("H*", $a);
|
/PHP-8.1/ext/phar/tests/ |
H A D | bug70091.phpt | 16 var_dump(unpack('H8sig/@6/nflags', $data)); 20 var_dump(unpack('H8sig/@6/nflags', $data)); 24 var_dump(unpack('H8sig/@8/nflags', $data)); 28 var_dump(unpack('H8sig/@8/nflags', $data));
|
/PHP-8.1/ext/mbstring/tests/ |
H A D | mb_str_split_utf8_utf16.phpt | 37 printf(" l:%d v:%s", strlen($chunk), unpack("H*", $chunk)[1]); 43 printf(" l:%d v:%s", strlen($chunk), unpack("H*", $chunk)[1]); 49 printf(" l:%d v:%s", strlen($chunk), unpack("H*", $chunk)[1]); 55 printf(" l:%d v:%s", strlen($chunk), unpack("H*", $chunk)[1]); 61 printf(" l:%d v:%s", strlen($chunk), unpack("H*", $chunk)[1]); 67 printf(" l:%d v:%s", strlen($chunk), unpack("H*", $chunk)[1]);
|
H A D | bug54494.phpt | 25 $t = unpack("H*",mb_substr($string, $i, 1, $mode)); 41 $t = unpack("H*",mb_substr($string, $i, 1, $mode));
|
H A D | mb_str_split_ru.phpt | 43 echo " " . unpack("H*", $split[$i])[1]; 62 last array element: %s expected: %s\n", unpack("H*", end($array))[1],unpack("H*", $enc)[1]);
|
/PHP-8.1/ext/standard/tests/array/ |
H A D | bug24766.phpt | 2 Bug #24766 (strange result array from unpack) 8 $a = unpack('C2', "\0224V");
|
/PHP-8.1/ext/phar/ |
H A D | shortarc.php | 117 $L = unpack('V', $a = (binary)fread($fp, 4)); 215 $info = unpack('V', substr($m, 0, 4)); 217 $l = unpack('V', substr($m, 10, 4)); 219 $s = unpack('V', substr($m, 0, 4)); 226 $len = unpack('V', substr($m, $start, 4)); 234 … $ret['m'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($m, $start, 24)));
|
/PHP-8.1/ext/standard/tests/serialize/ |
H A D | precision.phpt | 27 $num = unpack("d", pack("H*", $ns)); $num = reset($num); 30 $repr = unpack("H*", pack("d", $num2)); $repr = reset($repr);
|
/PHP-8.1/Zend/tests/generators/ |
H A D | bug66041.phpt | 2 Bug #66041: list() fails to unpack yielded ArrayAccess object
|