summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72543_5.phpt
blob: dc2fcdafe23296605351fde1f07527258cb7c58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #72543.5 (different references behavior comparing to PHP 5)
--FILE--
<?php
$arr = [1];
$ref =& $arr[0];
var_dump($arr[0] + ($arr[0] = 2));

$obj = new stdClass;
$obj->prop = 1;
$ref =& $obj->prop;
var_dump($obj->prop + ($obj->prop = 2));

?>
--EXPECT--
int(3)
int(3)