File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / strings / bug38770.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_17p0, v5_3_10, HEAD
php

--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','I','l') as $v) {
	print_r(unpack($v, pack($v, -30000)));
}

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>