summaryrefslogtreecommitdiff
path: root/tests/lang/bug24926.phpt
blob: 3d2cc7008baf22de7e70a16dc389c4fb64ddae68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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