summaryrefslogtreecommitdiff
path: root/tests/classes/object_reference_001.phpt
blob: ca5bbc5abe10d1501695b89a0971fe2e04ffb936 (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--
ZE2 object references
--FILE--
<?php

class Foo {
	public $name;
    
	function __construct() {
		$this->name = "I'm Foo!\n";
	}
}

$foo = new Foo;
echo $foo->name;
$bar = $foo;
$bar->name = "I'm Bar!\n";

// In ZE1, we would expect "I'm Foo!"
echo $foo->name;

?>
--EXPECT--
I'm Foo!
I'm Bar!