public static function indexOf(array $input, $value)
    {
        foreach ($input as $key => $inputValue) {
            if ($inputValue === $value) {
                return $key;
            }
        }

        return false;
    }
public static function indexOf(array $input, $value)
    {
        foreach ($input as $key => $inputValue) {
            if ($inputValue === $value) {
                return $key;
            }
        }

        return false;
    }
public static function indexOf ( array $ input , $ value ) { foreach ( $ input as $ key => $ inputValue ) { if ( $ inputValue === $ value ) { return $ key ; } } return false ; }
Returns the index of the first occurrence of a value in the provided
array.

If the value is not found, false is returned.

@param array $input
@param mixed $value

@return int|string|bool
Returns the index of the first occurrence of a value in the provided array .