xref: /php-src/Zend/tests/objects/objects_017.phpt (revision 275f63e7)
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: Uncaught Error: Cannot access private property foo::$test in %s:%d
19Stack trace:
20#0 {main}
21  thrown in %s on line %d
22