summaryrefslogtreecommitdiff
path: root/Zend/tests/objects_031.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/objects_031.phpt')
-rw-r--r--Zend/tests/objects_031.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Zend/tests/objects_031.phpt b/Zend/tests/objects_031.phpt
new file mode 100644
index 0000000000..1a62a046cb
--- /dev/null
+++ b/Zend/tests/objects_031.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Cloning stdClass
+--FILE--
+<?php
+
+$x[] = clone new stdclass;
+$x[] = clone new stdclass;
+$x[] = clone new stdclass;
+
+$x[0]->a = 1;
+
+var_dump($x);
+
+?>
+--EXPECTF--
+array(3) {
+ [0]=>
+ object(stdClass)#%d (1) {
+ [u"a"]=>
+ int(1)
+ }
+ [1]=>
+ object(stdClass)#%d (0) {
+ }
+ [2]=>
+ object(stdClass)#%d (0) {
+ }
+}