summaryrefslogtreecommitdiff
path: root/tests/lang/bug24499.phpt
blob: b7a35115ae20e94c5d69c771092cd09183c82b8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--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
)