Annotation of embedaddon/php/ext/standard/tests/strings/bug38770.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #38770 (unpack() broken with longs on 64 bit machines)
3: --SKIPIF--
4: <?php
5: if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6: ?>
7: --FILE--
8: <?php
9:
1.1.1.2 ! misho 10: foreach (array('N','l') as $v) {
1.1 misho 11: print_r(unpack($v, pack($v, -30000)));
12: }
13:
14: echo "Done\n";
15: ?>
16: --EXPECT--
17: Array
18: (
19: [1] => 4294937296
20: )
21: Array
22: (
23: [1] => -30000
24: )
25: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>