summaryrefslogtreecommitdiff
path: root/tests/lang/bug24926.phpt
blob: e7fd86ce7600acb7bd9aec1feae9f98b03c05562 (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
29
--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 __construct()
    {
        $function = create_function('', 'return "FOO\n";');
        print($function());
        
        $this->functions['test'] = $function;
        print($this->functions['test']());    // werkt al niet meer
    
    }
}

$a = new foo ();

?>
--EXPECTF--
Deprecated: Function create_function() is deprecated in %s on line %d
FOO
FOO