mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
31ef94cd42
Closes GH-6125
30 lines
512 B
PHP
30 lines
512 B
PHP
--TEST--
|
|
Bug #76667 (Segfault with divide-assign op and __get + __set)
|
|
--FILE--
|
|
<?php
|
|
|
|
class T {
|
|
public function __get($k)
|
|
{
|
|
return $undefined->$k;
|
|
}
|
|
|
|
public function __set($k, $v)
|
|
{
|
|
return $this->$v /= 0;
|
|
}
|
|
}
|
|
|
|
$x = new T;
|
|
try {
|
|
$x->x = 1;
|
|
} catch (\DivisionByZeroError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined variable $undefined in %s on line %d
|
|
|
|
Warning: Attempt to read property "1" on null in %s on line %d
|
|
Division by zero
|