$arrValue = array('first', 'second');
$ret = in_array(0, $arrValue);
=> string(5) "first"
=> string(6) "second"
That's because the function uses a non-strict comparison. The string in the array is compared to integer 0. Some typecasting is happening with data loss, and both are regarded the same:
var_dump(0 == 'first'); // bool(true)
So solve this, you can use the third parameter and set it to true to request strict comparison.
$ret = in_array(0, $arrValue, true);
Keep in mind, through, that strict is really strict. In a strict comparison,
0 is not equal to