Annotation of embedaddon/php/ext/standard/tests/strings/bug38770.phpt, revision 1.1
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:
! 10: foreach (array('N','I','l') as $v) {
! 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: Array
! 26: (
! 27: [1] => -30000
! 28: )
! 29: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>