summaryrefslogtreecommitdiff
path: root/Zend/tests/call_user_func_005.phpt
blob: 525b853fbfdf64c13be07e90b930a8615e5807d9 (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
30
31
32
33
34
35
--TEST--
Passing Closure as parameter to an non-existent function
--FILE--
<?php

class foo {
	public static function __callstatic($x, $y) {
		var_dump($x,$y);
		return 1;
	}
	
	public function teste() {
		return foo::x(function &($a=1,$b) { });
	}
}

var_dump(call_user_func(array('foo', 'teste')));

?>
--EXPECTF--
Deprecated: %son-static method foo::teste() should not be called statically in %s on line %d
%string|unicode%(1) "x"
array(1) {
  [0]=>
  object(Closure)#%d (1) {
    ["parameter"]=>
    array(2) {
      ["$a"]=>
      string(10) "<required>"
      ["$b"]=>
      string(10) "<required>"
    }
  }
}
int(1)