summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71336.phpt
blob: c5da420da04a8ca5bbcf3099203fae50b3ff808e (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--TEST--
Bug #71336 (Wrong is_ref on properties as exposed via get_object_vars())
--FILE--
<?php
class A
{
	protected $bar = array('baz');

	function bar()
	{
		array_pop($this->bar);
		$vars = get_object_vars($this);
		$this->bar[] = array('buz');
		print_r($vars);
	}

	function foo() {
		array_pop($this->bar);
		$dummy = &$this->bar;
		$vars = get_object_vars($this);
		$this->bar[] = array('buz');
		print_r($vars);
	}
}

(new A())->bar();
(new A())->foo();
?>
--EXPECT--
Array
(
    [bar] => Array
        (
        )

)
Array
(
    [bar] => Array
        (
            [0] => Array
                (
                    [0] => buz
                )

        )

)