The array search always returns false, even if it is not


Ok it's late night and I'm working non-stop from too many hours so here's why I don't manage to understand what's the problem here. I have an array:

    [bob] =>
    [mike-2] =>
    [tara] =>

I want to get the key searching for value so I'm using array_search:

// With an if statement...
if(in_array($_SERVER['SERVER_NAME'], $array)!==false)
    // something

// ... and also directly with this
$key = array_search($_SERVER['SERVER_NAME'], $array);
echo $key;

Result? Always false! There's no way for me to get tara when I'm looking for What the heck am I missing? I even tried replacing $_SERVER['SERVER_NAME'] directly with "" but of course it still doesn't work.

Edit: it was a typo error... damn. I wasted 2 hours for this.

Stop working. This is an actual answer. Just stop. Whenever it comes to you wasting two hours on a typo you're doing nobody any good, especially yourself.

Rest, you're not getting anywhere like this.