//实现php的内联式写法
class Demo
{
public $hello = null;
public function doo()
{
call_user_func($this->hello);
}
}
$demo = new Demo();
$demo->hello = function()
{
echo 'this is hello function';
}
$demo->doo();
php内联式写法
最新推荐文章于 2021-04-01 00:09:38 发布