public static function findString(array $array, $needle, $reverse = false)
    {
        if (!is_scalar($needle) && null !== $needle) {
            trigger_error(
                "Non-scalar search value; cannot cast to a string.", 
                E_USER_WARNING
            );
        }
        
        if ($reverse) {
            $array = array_reverse($array, true);
        }
        return array_search(
            strtolower((string)$needle),
            array_map("strtolower", $array)
        );
    }