mul_002.phpt 445 B

123456789101112131415161718192021222324
  1. --TEST--
  2. JIT MUL: 002 integer overflow
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.file_update_protection=0
  7. opcache.jit_buffer_size=32M
  8. ;opcache.jit_debug=257
  9. --EXTENSIONS--
  10. opcache
  11. --SKIPIF--
  12. <?php
  13. if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
  14. ?>
  15. --FILE--
  16. <?php
  17. function mul(int $a, int $b) {
  18. $res = $a * $b;
  19. var_dump($res);
  20. }
  21. mul(0x5555555555, 0x5555555555);
  22. ?>
  23. --EXPECT--
  24. float(1.343250910680478E+23)