Home  >  Article  >  Backend Development  >  自定义函数这样中的形参怎么理解

自定义函数这样中的形参怎么理解

WBOY
WBOYOriginal
2016-06-13 11:43:111001browse

自定义函数这样中的形参如何理解
下面是某个类中的一段代码

static function start(PDO $pdo){<br />			self::init($pdo);<br />			session_set_save_handler(<br />					array(__CLASS__,"open"),<br />					array(__CLASS__,"close"),<br />					array(__CLASS__,"read"),<br />					array(__CLASS__,"write"),<br />					array(__CLASS__,"destroy"),<br />					array(__CLASS__,"gc")<br />				);<br /><br />			session_start();<br />		}

该 函数中的PDO 做为形参,对此很疑惑,因为我理解函数的作用就是传参,返回传递回来的值的结果,而这种字符串如何传呢

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