I wrote the following comment in a programming forum:
This is how I would use the word "similar" in normal conversation. However, the dictionary says that "similar" is an adjective, and "similarly" should be used in this context instead:
Both constructions look grammatically correct to me, but the second one sounds weird. Searching the internet, I see both "behaves similar to" and "behaves similarly to" are used.
So are both considered grammatically correct?