mul_008.phpt 562 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. JIT MUL: 008 incorrect elimination of type store
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.file_update_protection=0
  7. opcache.jit_buffer_size=1M
  8. opcache.protect_memory=1
  9. --SKIPIF--
  10. <?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?>
  11. --FILE--
  12. <?php
  13. function foo(int $a){
  14. $a=$a%10;
  15. $a=$f=$a*(6158978401740);
  16. $a=$f=$a*(261740);
  17. $a%0;
  18. }
  19. foo(3);
  20. ?>
  21. --EXPECTF--
  22. Fatal error: Uncaught DivisionByZeroError: Modulo by zero in %smul_008.php:6
  23. Stack trace:
  24. #0 %smul_008.php(8): foo(%d)
  25. #1 {main}
  26. thrown in %smul_008.php on line 6