PHP is a weakly typed language and will automatically convert variable types according to specific scenarios. The arrays you want to search are obviously all integers, so you can only convert the variables into integers. When pure characters are converted into integers, 0 is naturally included.
bool in_array ( mixed $needle , array $haystack [, bool $strict = FALSE ] )
You need to use the third parameter.
PHP is a weakly typed language and will automatically convert variable types according to specific scenarios. The arrays you want to search are obviously all integers, so you can only convert the variables into integers. When pure characters are converted into integers, 0 is naturally included.
This is because there is a problem with converting strings to digits. var_dump('d'==0); true pure characters will be converted to 0