php函数in_array奇怪现象

WBOY
Release: 2016-06-23 13:31:33
Original
901 people have browsed it

$k = 0;$fieldArr = array('tt', 'bb');if ( in_array( $k, $fieldArr)) {	echo '1';}
Copy after login


按理来说,是不会输出1的,但是最后输出1, 是不是in_array函数使用的时候会转类型呢,卖个关子,看了源码告诉大家

版权声明:本文为博主原创文章,未经博主允许不得转载。

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!