1--TEST--
2Passing Closure as parameter to an non-existent function
3--FILE--
4<?php
5
6class foo {
7    public static function __callstatic($x, $y) {
8        var_dump($x,$y);
9        return 1;
10    }
11
12    public static function teste() {
13        return foo::x(function &($a=1,$b) { });
14    }
15}
16
17var_dump(call_user_func(array('foo', 'teste')));
18
19?>
20--EXPECTF--
21Deprecated: {closure:%s:%d}(): Optional parameter $a declared before required parameter $b is implicitly treated as a required parameter in %s on line %d
22string(1) "x"
23array(1) {
24  [0]=>
25  object(Closure)#%d (4) {
26    ["name"]=>
27    string(%d) "{closure:%s:%d}"
28    ["file"]=>
29    string(%d) "%s"
30    ["line"]=>
31    int(%d)
32    ["parameter"]=>
33    array(2) {
34      ["$a"]=>
35      string(10) "<required>"
36      ["$b"]=>
37      string(10) "<required>"
38    }
39  }
40}
41int(1)
42