array_search returns false when using a math expression as search parameter PHP [duplicate]

I’ve got an array like this:

$scores = array(22.5,88.8,56,0);

when I search for a value like this:
$index = array_search(88.8,$scores);
$index is correct (1)

When I do the following:
$search = 88.8; $index = array_search($search,$scores);
everything is fine too.

But when I generate the search parameter like this:
$search= (100/(intval($count[0]))*intval($countwon[0]));
it returns bool(false)
When I var_dump $search it is a float(88.8).

So what am I doing wrong here?