File: issue067.phpt

package info (click to toggle)
php-msgpack 1%3A2.2.0~rc2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,200 kB
  • sloc: ansic: 3,817; xml: 416; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Issue #67 (uint64_t)
--SKIPIF--
<?php
if (!extension_loaded("msgpack")) {
    die("skip");
}
if (PHP_INT_SIZE !== 8)
    die("skip this test is for 64-bit platforms only");
?>
--FILE--
<?php
var_dump(msgpack_unpack("\xcf"."\x7f\xff\xff\xff"."\xff\xff\xff\xff"));
var_dump(msgpack_unpack("\xcf"."\x80\x00\x00\x00"."\x00\x00\x00\x00"));
var_dump(msgpack_unpack("\xcf"."\xff\xff\xff\xff"."\xff\xff\xff\xff"));
?>
OK
--EXPECT--
int(9223372036854775807)
string(19) "9223372036854775808"
string(20) "18446744073709551615"
OK