xref: /PHP-8.2/Zend/tests/bug72543_5.phpt (revision 61d00a6c)
1--TEST--
2Bug #72543.5 (different references behavior comparing to PHP 5)
3--FILE--
4<?php
5$arr = [1];
6$ref =& $arr[0];
7var_dump($arr[0] + ($arr[0] = 2));
8
9$obj = new stdClass;
10$obj->prop = 1;
11$ref =& $obj->prop;
12var_dump($obj->prop + ($obj->prop = 2));
13
14?>
15--EXPECT--
16int(3)
17int(3)
18