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 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: %son-static method foo::teste() should not be called statically in %s on line %d 22%string|unicode%(1) "x" 23array(1) { 24 [0]=> 25 object(Closure)#%d (1) { 26 ["parameter"]=> 27 array(2) { 28 ["$a"]=> 29 string(10) "<required>" 30 ["$b"]=> 31 string(10) "<required>" 32 } 33 } 34} 35int(1) 36