-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Labels
Description
Description
The following code:
<?php
function foo(int $a){
$a=$a%10;var_dump($a);
$a=$f=$a*(261740);var_dump($a);
$a%0;var_dump($a);
}
foo(3);
Resulted in this output:
int(3)
int(785220)
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /tmp/test.php:5
Stack trace:
#0 /tmp/test.php(7): foo(785220)
#1 {main}
thrown in /tmp/test.php on line 5
But I expected this output instead (JIT 1213):
int(3)
int(785220)
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /tmp/test.php:5
Stack trace:
#0 /tmp/test.php(7): foo(3)
#1 {main}
thrown in /tmp/test.php on line 5
PHP Version
nightly
Operating System
ubuntu 22.04