summaryrefslogtreecommitdiff
path: root/Zend/tests/objects_017.phpt
blob: c07de71b73e7a124fe9648872bc820e98fe9bed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Testing visibility of object returned by function
--FILE--
<?php

class foo {
	private $test = 1;
}

function test() {
	return new foo;
}

test()->test = 2;

?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property foo::$test' in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d