bug72093.phpt 403 B

123456789101112131415161718
  1. --TEST--
  2. Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
  3. --SKIPIF--
  4. <?php
  5. if(!extension_loaded("bcmath")) print "skip";
  6. if (substr(PHP_OS, 0, 3) == 'WIN') {
  7. die('skip Not valid for windows');
  8. }
  9. ?>
  10. --FILE--
  11. <?php
  12. var_dump(bcpowmod(1, "A", 128, -200));
  13. var_dump(bcpowmod(1, 1.2, 1, 1));
  14. ?>
  15. --EXPECTF--
  16. string(1) "1"
  17. bc math warning: non-zero scale in exponent
  18. string(3) "0.0"