1--TEST-- 2Test is_callable() function : usage variations - anonymous class method 3--FILE-- 4<?php 5 6new class { 7 function __construct() { 8 $fname = null; 9 if (is_callable([$this, 'f'], false, $fname)) { 10 call_user_func($fname); 11 } else { 12 echo "dang\n"; 13 } 14 } 15 function f() { 16 echo "nice\n"; 17 } 18}; 19 20?> 21--EXPECT-- 22nice 23