fb_call_user_func_async should support KindOfFunc and KindOfClsMeth
[hiphop-php.git] / hphp / test / slow / global_func / class_meth / dv_arr_hack_arr / call_user_func.php
blob75a1c6884ed540e72fdccc7ce3a769318e7e172d
1 <?hh
3 require_once 'call_user_func.inc';
5 function test($f) {
6 try {
7 \var_dump(fb_call_user_func_async(__DIR__.'/call_user_func.inc', $f, 2));
8 } catch (Exception $e) {
9 print($e->getMessage()."\n");
13 <<__EntryPoint>>
14 function main() {
15 test('afunc');
16 test(hh\fun('afunc'));
17 test(array('C', 'cfunc'));
18 test(hh\class_meth('C', 'cfunc'));
19 \var_dump(is_callable(hh\class_meth('C', 'cfunc')));
20 \var_dump(call_user_func_array(hh\class_meth('C', 'cfunc'), array(2)));
21 register_postsend_function(hh\class_meth('C', 'postSend'));
22 register_shutdown_function(hh\class_meth('C', 'onShutdown'));