mirror of
https://github.com/php/php-src.git
synced 2024-12-01 22:03:36 +08:00
19 lines
254 B
PHP
19 lines
254 B
PHP
--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: Cannot access private property foo::$test in %s on line %d
|