Accept function as parameter in PHP

后端 未结 8 773
Happy的楠姐
Happy的楠姐 2020-11-28 06:22

I\'ve been wondering whether is possible or not to pass a function as parameter in PHP; I want something like when you\'re programming in JS:

object.exampleM         


        
8条回答
  •  孤独总比滥情好
    2020-11-28 07:00

    You can also use create_function to create a function as a variable and pass it around. Though, I like the feeling of anonymous functions better. Go zombat.

提交回复
热议问题