xref: /PHP-5.5/Zend/tests/objects_017.phpt (revision 999d2e22)
1--TEST--
2Testing visibility of object returned by function
3--FILE--
4<?php
5
6class foo {
7	private $test = 1;
8}
9
10function test() {
11	return new foo;
12}
13
14test()->test = 2;
15
16?>
17--EXPECTF--
18Fatal error: Cannot access private property foo::$test in %s on line %d
19