1--TEST--
2Exception in compound assign op should prevent call to overloaded object handlers
3--FILE--
4<?php
5
6class Test {
7    public function __get($k) {
8        $this->$k = 42;
9        return 0;
10    }
11}
12
13$test = new ArrayObject;
14$test[0] = 42;
15try {
16    $test[0] %= 0;
17} catch (Error $e) {
18    echo $e->getMessage(), "\n";
19}
20var_dump($test);
21
22$test2 = new Test;
23try {
24    $test2->prop %= 0;
25} catch (Error $e) {
26    echo $e->getMessage(), "\n";
27}
28var_dump($test2);
29
30?>
31--EXPECT--
32Modulo by zero
33object(ArrayObject)#1 (1) {
34  ["storage":"ArrayObject":private]=>
35  array(1) {
36    [0]=>
37    int(42)
38  }
39}
40Modulo by zero
41object(Test)#3 (1) {
42  ["prop"]=>
43  int(42)
44}
45