xref: /php-src/tests/lang/bug24499.phpt (revision f8d79582)
1--TEST--
2Bug #24499 (bogus handling of a public property as a private one)
3--FILE--
4<?php
5class Id {
6        private $id="priv";
7
8        public function tester($obj)
9        {
10                $obj->id = "bar";
11        }
12}
13
14$id = new Id();
15$obj = new stdClass;
16$obj->foo = "bar";
17$id->tester($obj);
18print_r($obj);
19?>
20--EXPECT--
21stdClass Object
22(
23    [foo] => bar
24    [id] => bar
25)
26