php-src/tests/lang/bug24499.phpt
2020-02-03 22:52:20 +01:00

26 lines
381 B
PHP

--TEST--
Bug #24499 (bogus handling of a public property as a private one)
--FILE--
<?php
class Id {
private $id="priv";
public function tester($obj)
{
$obj->id = "bar";
}
}
$id = new Id();
$obj = new stdClass;
$obj->foo = "bar";
$id->tester($obj);
print_r($obj);
?>
--EXPECT--
stdClass Object
(
[foo] => bar
[id] => bar
)