1--TEST--
264bit pack()/unpack() tests
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE > 4) {
6    die("skip 32bit test only");
7}
8?>
9--FILE--
10<?php
11try {
12    var_dump(pack("Q", 0));
13} catch (ValueError $e) {
14    echo $e->getMessage(), "\n";
15}
16try {
17    var_dump(pack("J", 0));
18} catch (ValueError $e) {
19    echo $e->getMessage(), "\n";
20}
21try {
22    var_dump(pack("P", 0));
23} catch (ValueError $e) {
24    echo $e->getMessage(), "\n";
25}
26try {
27    var_dump(pack("q", 0));
28} catch (ValueError $e) {
29    echo $e->getMessage(), "\n";
30}
31
32try {
33    var_dump(unpack("Q", ''));
34} catch (ValueError $e) {
35    echo $e->getMessage(), "\n";
36}
37try {
38    var_dump(unpack("J", ''));
39} catch (ValueError $e) {
40    echo $e->getMessage(), "\n";
41}
42try {
43    var_dump(unpack("P", ''));
44} catch (ValueError $e) {
45    echo $e->getMessage(), "\n";
46}
47try {
48    var_dump(unpack("q", ''));
49} catch (ValueError $e) {
50    echo $e->getMessage(), "\n";
51}
52
53?>
54--EXPECT--
5564-bit format codes are not available for 32-bit versions of PHP
5664-bit format codes are not available for 32-bit versions of PHP
5764-bit format codes are not available for 32-bit versions of PHP
5864-bit format codes are not available for 32-bit versions of PHP
5964-bit format codes are not available for 32-bit versions of PHP
6064-bit format codes are not available for 32-bit versions of PHP
6164-bit format codes are not available for 32-bit versions of PHP
6264-bit format codes are not available for 32-bit versions of PHP
63