diff options
Diffstat (limited to 'Zend/tests/bug27268.phpt')
-rwxr-xr-x | Zend/tests/bug27268.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Zend/tests/bug27268.phpt b/Zend/tests/bug27268.phpt new file mode 100755 index 000000000..3c34c90fc --- /dev/null +++ b/Zend/tests/bug27268.phpt @@ -0,0 +1,28 @@ +--TEST--
+Bug #27268 (Bad references accentuated by clone)
+--FILE--
+<?php
+class A
+{
+ public function &getA()
+ {
+ return $this->a;
+ }
+}
+
+$A = new A;
+$A->a = array(1);
+$x = $A->getA();
+$clone = clone $A;
+$clone->a = array();
+print_r($A);
+?>
+--EXPECT--
+A Object
+(
+ [a] => Array
+ (
+ [0] => 1
+ )
+
+)
|