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

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

WBOY
Release: 2016-06-13 12:09:45
Original
724 people have browsed it

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

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

函数的值怎么能是函数呢,函数的值到底是怎么规定的
------解决思路----------------------
函数的参数可以是任何数据(当然你可以自己限定)
在你示例的代码中 $type 就是一个对象

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template