bug35014_64bit.phpt 599 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Bug #35014 (array_product() always returns 0) (64bit)
  3. --SKIPIF--
  4. <?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
  5. --INI--
  6. precision=14
  7. --FILE--
  8. <?php
  9. $tests = array(
  10. array(),
  11. array(0),
  12. array(3),
  13. array(3, 3),
  14. array(0.5, 2),
  15. array(99999999, 99999999),
  16. array(8.993, 7443241,988, sprintf("%u", -1)+0.44),
  17. array(2,sprintf("%u", -1)),
  18. );
  19. foreach ($tests as $v) {
  20. var_dump(array_product($v));
  21. }
  22. ?>
  23. --EXPECT--
  24. int(1)
  25. int(0)
  26. int(3)
  27. int(9)
  28. float(1)
  29. int(9999999800000001)
  30. float(1.219953680144986E+30)
  31. float(3.6893488147419103E+19)