Here is the code I am looking at.
foreach ($header as $idx => $field) {
if (stripos($field, \'foo\') !== false) {
$cols[\'foo\'] = $idx;
In PHP, !== means not of the same type AND value.
If stripos() returns anything other than false (and exactly 'false', and not zero), it means it has found something, even if the position is 0 and int(0) is returned. 0 and false are equal when doing a standard comparison with the == but not when using the identity === operator, so the only way to know if stripos() has found something for certain is to compare false's value and type using !== (not identical, ie of both the same type and value of strpos()'s return value.)