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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:31:06
Original
1151 people have browsed it

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

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 />
		}
Copy after login

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

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