summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70083.phpt
blob: 6b20eabb39612098d33c1f607d49b8d910adc822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #70083 (Use after free with assign by ref to overloaded objects)
--FILE--
<?php

class foo {
	private $var;
	function __get($e) {
		return $this;
	}
}

function &noref() { $foo = 1; return $foo; }

$foo = new foo;
$foo->i = &noref();
var_dump($foo);

?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d