Annotation of embedaddon/php/Zend/tests/int_underflow_64bit.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: testing integer underflow (64bit)
! 3: --SKIPIF--
! 4: <?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: $doubles = array(
! 9: -9223372036854775808,
! 10: -9223372036854775809,
! 11: -9223372036854775818,
! 12: -9223372036854775908,
! 13: -9223372036854776808,
! 14: );
! 15:
! 16: foreach ($doubles as $d) {
! 17: $l = (int)$d;
! 18: var_dump($l);
! 19: }
! 20:
! 21: echo "Done\n";
! 22: ?>
! 23: --EXPECTF--
! 24: int(-9223372036854775808)
! 25: int(-9223372036854775808)
! 26: int(-9223372036854775808)
! 27: int(-9223372036854775808)
! 28: int(-9223372036854775808)
! 29: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>