Home  >  Article  >  Backend Development  >  php函数in_array奇怪现象

php函数in_array奇怪现象

WBOY
WBOYOriginal
2016-06-23 13:31:33907browse

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


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

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

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