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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 12:09:45731browse

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

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

函数的值怎么能是函数呢,函数的值到底是怎么规定的
------解决思路----------------------
函数的参数可以是任何数据(当然你可以自己限定)
在你示例的代码中 $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