Home > Backend Development > PHP Tutorial > array_search()函数,第3个参数,有什么功用

array_search()函数,第3个参数,有什么功用

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:36:16
Original
932 people have browsed it

array_search()函数,第3个参数,有什么作用?
http://docs.php.net/manual/zh/function.array-search.php

<br />
mixed array_search ( mixed $needle , array $haystack [, bool $strict = false ] )<br />
Copy after login


strict
如果可选的第三个参数 strict 为 TRUE,则 array_search() 将在 haystack 中检查完全相同的元素。 这意味着同样检查 haystack 里 needle 的 类型,并且对象需是同一个实例。


问题:
这个函数,第3个参数:$strict = false,有什么作用?
给个实例。

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