]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_4_3'.
authorSVN Migration <svn@php.net>
Sat, 29 Nov 2003 02:28:50 +0000 (02:28 +0000)
committerSVN Migration <svn@php.net>
Sat, 29 Nov 2003 02:28:50 +0000 (02:28 +0000)
tests/lang/bug24926.phpt [new file with mode: 0644]

diff --git a/tests/lang/bug24926.phpt b/tests/lang/bug24926.phpt
new file mode 100644 (file)
index 0000000..3d2cc70
--- /dev/null
@@ -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