mirror of
https://github.com/php/php-src.git
synced 2024-12-19 06:50:17 +08:00
1179686f62
Closes GH-5446 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
39 lines
787 B
PHP
39 lines
787 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;
|
|
$x->x = 1;
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined variable $undefined in %s on line %d
|
|
|
|
Warning: Attempt to read property '1' on null in %s on line %d
|
|
|
|
Warning: Division by zero in %s on line %d
|
|
|
|
Warning: Undefined variable $undefined in %s on line %d
|
|
|
|
Warning: Attempt to read property 'NAN' on null in %s on line %d
|
|
|
|
Warning: Division by zero in %s on line %d
|
|
|
|
Warning: Undefined variable $undefined in %s on line %d
|
|
|
|
Warning: Attempt to read property 'NAN' on null in %s on line %d
|
|
|
|
Warning: Division by zero in %s on line %d
|