summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/bug38770.phpt
blob: 1821639aca0491b7aa10944c9d2c624f6e54abf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Bug #38770 (unpack() broken with longs on 64 bit machines)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php

foreach (array('N','l') as $v) {
	print_r(unpack($v, pack($v, -30000)));
}

echo "Done\n";
?>
--EXPECT--	
Array
(
    [1] => 4294937296
)
Array
(
    [1] => -30000
)
Done