]> granicus.if.org Git - php/commitdiff
Add test for previously fixed segfault
authorXinchen Hui <laruence@php.net>
Wed, 4 Mar 2015 10:26:58 +0000 (18:26 +0800)
committerXinchen Hui <laruence@php.net>
Wed, 4 Mar 2015 10:26:58 +0000 (18:26 +0800)
Zend/tests/closure_057.phpt [new file with mode: 0644]

diff --git a/Zend/tests/closure_057.phpt b/Zend/tests/closure_057.phpt
new file mode 100644 (file)
index 0000000..f006224
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+Closure 057: segfault in leave helper
+--FILE--
+<?php
+class A {
+}
+
+function getfunc() {
+       $b = function() {
+               $a = function() {
+               };
+               $a();
+       };
+       return $b->bindTo(new A());
+}
+
+call_user_func(getfunc());
+
+echo "okey";
+?>
+--EXPECT--
+okey