diff options
Diffstat (limited to 'Zend/tests/indirect_method_call_004.phpt')
-rw-r--r-- | Zend/tests/indirect_method_call_004.phpt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Zend/tests/indirect_method_call_004.phpt b/Zend/tests/indirect_method_call_004.phpt new file mode 100644 index 0000000..689600d --- /dev/null +++ b/Zend/tests/indirect_method_call_004.phpt @@ -0,0 +1,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) { +} |