diff options
author | Nikita Popov <nikic@php.net> | 2014-10-19 13:21:51 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-10-19 13:22:44 +0200 |
commit | 4b892439e61634b4bdcbf0bd54ef8577575875fd (patch) | |
tree | 4d69bdaa90e6d8ca0750ff013cf65f4acf9ff62c /Zend/tests | |
parent | d0151cfe0073991b3051875ded00bce19ecea009 (diff) | |
download | php-git-4b892439e61634b4bdcbf0bd54ef8577575875fd.tar.gz |
Fix bug #68262: Broken reference across cloned objects
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/bug68262.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/bug68262.phpt b/Zend/tests/bug68262.phpt new file mode 100644 index 0000000000..8d009f621e --- /dev/null +++ b/Zend/tests/bug68262.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #68262: Broken reference across cloned objects +--FILE-- +<?php + +class C { + public $p; +} + +$first = new C; +$first->p = 'init'; + +$clone = clone $first; +$ref =& $first->p; +unset($ref); + +$clone = clone $first; +$clone->p = 'foo'; + +var_dump($first->p); + +?> +--EXPECT-- +string(4) "init" |