mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
540fed1b36
The result == op1 check did not work properly here, because op1 was &op1_copy at this point. Move the division by zero reporting out of the _base function, so it can check the original op1.
15 lines
261 B
PHP
15 lines
261 B
PHP
--TEST--
|
|
Division by zero in compound operator with type coercion
|
|
--FILE--
|
|
<?php
|
|
$x = 42;
|
|
try {
|
|
$$x /= 0;
|
|
} catch (DivisionByZeroError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined variable $42 in %s on line %d
|
|
Division by zero
|