int_underflow_64bit.phpt 570 B

1234567891011121314151617181920212223242526272829
  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. $doubles = array(
  8. -9223372036854775808,
  9. -9223372036854775809,
  10. -9223372036854775818,
  11. -9223372036854775908,
  12. -9223372036854776808,
  13. );
  14. foreach ($doubles as $d) {
  15. $l = (int)$d;
  16. var_dump($l);
  17. }
  18. echo "Done\n";
  19. ?>
  20. --EXPECT--
  21. int(-9223372036854775808)
  22. int(-9223372036854775808)
  23. int(-9223372036854775808)
  24. int(-9223372036854775808)
  25. int(-9223372036854775808)
  26. Done