标签:ref blog room 一个 call 详解 roo mda https
来源:https://blog.csdn.net/moliyiran/article/details/83514495
call_user_func — 把第一个参数作为回调函数调用
通过函数的方式回调
<?php function barber($type){ echo "you wanted a $type haircut, no problem\n"; } call_user_func(‘barber‘,‘mushroom‘); ?>
返回内容如下:
you wanted a mushroom haircut, no problem
通过类名、对象的方式回调
标签:ref blog room 一个 call 详解 roo mda https
原文地址:https://www.cnblogs.com/laijinquan/p/11925428.html