summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/tests/generators/aborted_yield_during_new.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/generators/aborted_yield_during_new.phpt b/Zend/tests/generators/aborted_yield_during_new.phpt
new file mode 100644
index 0000000000..957b251aad
--- /dev/null
+++ b/Zend/tests/generators/aborted_yield_during_new.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Aborted yield during object instantiation
+--FILE--
+<?php
+
+class Foo {
+ public function __construct() {}
+}
+
+function gen() {
+ $x = new Foo(yield);
+}
+
+gen()->rewind();
+
+?>
+===DONE===
+--EXPECT--
+===DONE===