Home
last modified time | relevance | path

Searched refs:pack (Results 1 – 25 of 96) sorted by relevance

1234

/PHP-8.1/ext/standard/tests/strings/
H A Dpack.phpt2 Generic pack()/unpack() tests
13 echo '"'.pack("A9", "hello").'"';
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)));
[all …]
H A Dpack_float.phpt6 'pack e',
7 bin2hex(pack("e", "")),
11 bin2hex(pack("e", 0)),
12 bin2hex(pack("e", 1)),
23 'pack E',
40 'pack g',
57 'pack G',
117 string(6) "pack e"
133 string(6) "pack E"
149 string(6) "pack g"
[all …]
H A Dpack64.phpt2 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 Dpack_Z.phpt2 pack()/unpack(): "Z" format
6 pack("Z0", "f"),
7 pack("Z5", "foo\0"),
8 pack("Z4", "fooo"),
9 pack("Z4", "foo"),
10 pack("Z*", "foo"),
H A Dpack_A.phpt2 pack()/unpack(): "A" modifier
6 pack("A5", "foo "),
7 pack("A4", "fooo"),
8 pack("A4", "foo"),
H A Dbug35817.phpt5 $a = pack("H3","181");
9 $a = pack("H2","18");
13 $a = pack("H","1");
H A Dbug70487.phpt2 Bug #70487: pack('x') produces an error
6 var_dump(pack('x') === "\0");
H A Dpack64_32.phpt2 64bit pack()/unpack() tests
12 var_dump(pack("Q", 0));
17 var_dump(pack("J", 0));
22 var_dump(pack("P", 0));
27 var_dump(pack("q", 0));
H A Dbug78833.phpt2 Bug #78833 (Integer overflow in pack causes out-of-bound access)
6 var_dump(pack("E2E2147483647H*", 0x0, 0x0, 0x0));
/PHP-8.1/ext/mbstring/tests/
H A Dmb_convert_encoding_stateful.phpt11 echo bin2hex(mb_convert_encoding(pack("H*", "1b24401b24402121"), "UTF-8", "ISO-2022-JP")), "\n";
12 echo bin2hex(mb_convert_encoding(pack("H*", "1b24421b24422121"), "UTF-8", "ISO-2022-JP")), "\n";
13 echo bin2hex(mb_convert_encoding(pack("H*", "1b28421b284261626364"), "UTF-8", "ISO-2022-JP")), "\n";
14 echo bin2hex(mb_convert_encoding(pack("H*", "1b284a1b284a61626364"), "UTF-8", "ISO-2022-JP")), "\n";
15 echo bin2hex(mb_convert_encoding(pack("H*", "1b24401b284261626364"), "UTF-8", "ISO-2022-JP")), "\n";
16 echo bin2hex(mb_convert_encoding(pack("H*", "1b24401b284a61626364"), "UTF-8", "ISO-2022-JP")), "\n";
17 echo bin2hex(mb_convert_encoding(pack("H*", "1b24421b284261626364"), "UTF-8", "ISO-2022-JP")), "\n";
18 echo bin2hex(mb_convert_encoding(pack("H*", "1b24421b284a61626364"), "UTF-8", "ISO-2022-JP")), "\n";
20 echo bin2hex(mb_convert_encoding(pack("H*", "1b2429430e0f61626364"), "UTF-8", "ISO-2022-KR")), "\n";
22 echo bin2hex(mb_convert_encoding(pack("H*", "7e7b7e7d61626364"), "UTF-8", "HZ")), "\n";
H A Dsjismac_encoding.phpt28 $macJap = pack('n', $bytes);
35 $validChars[$macJap] = pack('NNNN', $cp1, $cp2, $cp3, $cp4);
38 $validChars[$macJap] = pack('NNN', $cp1, $cp2, $cp3);
39 $fromUnicode[pack('nnn', $cp1, $cp2, $cp3)] = $macJap;
41 $validChars[$macJap] = pack('NN', $cp1, $cp2);
42 $fromUnicode[pack('nn', $cp1, $cp2)] = $macJap;
44 $validChars[$macJap] = pack('N', $cp1);
45 $fromUnicode[pack('n', $cp1)] = $macJap;
52 $validChars[chr($i)] = pack('N', $i);
53 $fromUnicode[pack('n', $i)] = chr($i);
[all …]
H A Dmb_strwidth.phpt11 $euc_jp = pack('H*', '30313233a4b3a4cecab8bbfacef3a4cfc6fccbdcb8eca4c7a4b9a1a34555432d4a50a4f2bbc8…
15 $utf16le = pack('H*', '1a043804400438043b043b04380446043004200069007300200043007900720069006c006c00…
17 $utf16be = pack('H*', '041a043804400438043b043b04380446043000200069007300200043007900720069006c006c…
19 $koi8r = pack('H*', 'ebc9d2c9ccccc9c3c120697320437972696c6c6963');
H A Dmb_str_split_utf8_utf16.phpt13 $utf8 = pack("H*", "313233f09280a9");
16 $utf8_bad = pack("H*", "313233f092");
19 $utf16_first_be = pack("H*", "d800dc00");
20 $utf16_first_le = pack("H*", "00d800dc");
22 $utf16_last_be = pack("H*", "dbffdfff");
23 $utf16_last_le = pack("H*", "ffdbffdf");
24 $utf16be_char_bad = pack("H*", "dc00dc00"); /* this char is illegal because it starts from low surr…
25 $utf16le_char_bad = pack("H*", "00dc00dc"); /* this char is illegal because it starts from low surr…
/PHP-8.1/ext/phar/tests/zip/files/
H A Dcorrupt_zipmaker.php.inc90 $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
97 $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $fakecomp) .
104 $file = "PK\x03\x04\x14\x00\x01\x00" . pack('v', $compmethod) .
111 $file = "PK\x03\x04\x14\x00\x00\x00" . pack('v', $compmethod) .
286 pack("vvVVv", $this->count, $this->count,
292 pack("vvVVv", $this->count, $this->count,
298 pack("vvVVv", $this->count + 1, $this->count,
304 pack("vvVVv", $this->count, $this->count + 1,
310 pack("vvVVv", $this->count, $this->count,
316 pack("vvVVv", $this->count, $this->count,
[all …]
/PHP-8.1/ext/gd/tests/
H A Dbug72339.phpt24 fwrite($fh, pack("n", 2));
25 fwrite($fh, pack("n", 1));
26 fwrite($fh, pack("n", 1));
27 fwrite($fh, pack("n", 0x40));
28 fwrite($fh, pack("n", 2));
29 fwrite($fh, pack("n", 0x5AA0)); // Chunks Wide
30 fwrite($fh, pack("n", 0x5B00)); // Chunks Vertically
H A Dbug75111.phpt9 $str .= pack("V", -0x120000); // offset of image data
10 $str .= pack("V", 40); // length of header
11 $str .= pack("V", 256); // width
12 $str .= pack("V", 256); // height
/PHP-8.1/ext/phar/
H A Dtar.h23 #pragma pack(1)
34 # pragma pack 0
58 # pragma pack 0
98 #pragma pack()
/PHP-8.1/ext/phar/tests/
H A D010.phpt15 $manifest = pack('V', 1) . 'a' . pack('VVVVVV', 0, time(), 0, crc32(''), 0x00000000, 0);
16 $file .= pack('VVnVV', strlen($manifest), 1, 0x1000, 0x00000000, 3) . 'hio' . pack('V', 0) . $manif…
/PHP-8.1/ext/phar/tests/files/
H A Dphar_test.inc41 $manifest .= pack('V', strlen($name)) . (binary)$name;
42 …$manifest .= pack('VVVVVV', $ulen, $time, $clen, $crc32, $flags|$perm, strlen($meta)) . (binary)$m…
53 $manifest = pack('VnVV', count($files), isset($hasdir) ? 0x1110 : 0x1000, $gflags, strlen($alias)) …
55 $file .= pack('V', strlen($manifest)) . $manifest;
/PHP-8.1/ext/phar/tests/cache_list/files/
H A Dphar_test.inc41 $manifest .= pack('V', strlen($name)) . (binary)$name;
42 …$manifest .= pack('VVVVVV', $ulen, $time, $clen, $crc32, $flags|$perm, strlen($meta)) . (binary)$m…
53 $manifest = pack('VnVV', count($files), isset($hasdir) ? 0x1110 : 0x1000, $gflags, strlen($alias)) …
55 $file .= pack('V', strlen($manifest)) . $manifest;
/PHP-8.1/ext/dba/tests/
H A Dbug38698.phpt14 return 0x00FF === current(unpack('v', pack('S',0x00FF)));
21 dba_insert(pack('V',129), "Booo!", $db_make);
23 dba_insert(pack('i',129), "Booo!", $db_make);
/PHP-8.1/ext/opcache/jit/vtune/
H A Dittnotify_types.h85 #pragma pack(push, 8)
93 #pragma pack(pop)
/PHP-8.1/ext/intl/tests/
H A Dresourcebundle.inc4 if (pack('S', 0xABCD) !== pack('v', 0xABCD)) {
/PHP-8.1/ext/ffi/tests/
H A Dbug79571.phpt7 if (pack('S', 0xABCD) !== pack('v', 0xABCD)) {
/PHP-8.1/ext/standard/tests/serialize/
H A Dprecision.phpt5 if (pack('s', 1) != "\x01\x00")
27 $num = unpack("d", pack("H*", $ns)); $num = reset($num);
30 $repr = unpack("H*", pack("d", $num2)); $repr = reset($repr);

Completed in 31 milliseconds

1234