Home >Backend Development >PHP Tutorial >为啥下面这个函数中的值是对象呢

为啥下面这个函数中的值是对象呢

WBOY
WBOYOriginal
2016-06-23 13:45:37832browse

public function -run($type){    $type->version();    $type->work();}

函数的值怎么能是函数呢,函数的值到底是怎么规定的


回复讨论(解决方案)

函数的参数可以是任何数据(当然你可以自己限定)
在你示例的代码中 $type 就是一个对象

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn