如果您使用的是PHP 5.3.0或更高版本,则是可能的。
请参见手册中的匿名函数。
对于您的情况,您将这样定义
exampleMethod:
function exampleMethod($anonFunc) { //execute anonymous function $anonFunc();}
如果您使用的是PHP 5.3.0或更高版本,则是可能的。
请参见手册中的匿名函数。
对于您的情况,您将这样定义
exampleMethod:
function exampleMethod($anonFunc) { //execute anonymous function $anonFunc();}