summaryrefslogtreecommitdiff
path: root/tests/lang/bug24926.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug24926.phpt')
-rw-r--r--tests/lang/bug24926.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/lang/bug24926.phpt b/tests/lang/bug24926.phpt
new file mode 100644
index 0000000..3d2cc70
--- /dev/null
+++ b/tests/lang/bug24926.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #24926 (lambda function (create_function()) cannot be stored in a class property)
+--FILE--
+<?php
+
+error_reporting (E_ALL);
+
+class foo {
+
+ public $functions = array();
+
+ function foo()
+ {
+ $function = create_function('', 'return "FOO\n";');
+ print($function());
+
+ $this->functions['test'] = $function;
+ print($this->functions['test']()); // werkt al niet meer
+
+ }
+}
+
+$a = new foo ();
+
+?>
+--EXPECT--
+FOO
+FOO