summaryrefslogtreecommitdiff
path: root/Zend/tests/indirect_method_call_004.phpt
blob: 689600d1f44642b171177366386baf921b62e253 (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
--TEST--
Indirect method call and cloning
--FILE--
<?php


class bar {
	public $z;

	public function __construct() {
		$this->z = new stdclass;
	}
	public function getZ() {
		return $this->z;
	}
}

var_dump(clone (new bar)->z);
var_dump(clone (new bar)->getZ());

?>
--EXPECTF--
object(stdClass)#%d (0) {
}
object(stdClass)#%d (0) {
}