Such comments are generally constructive, if worded properly. They don't answer the question, which is why they get posted as comments rather than answers, but it's useful additional information for the OP and for other readers alike that may not know that the feature is deprecated.
Although I don't typically read PHP questions, the response on such comments in other tags that I do read is generally positive (something like "oh, didn't know that, what should I use instead?"), sometimes even getting the question changed in a way that allows for answers not using the deprecated feature.
Note the "if worded properly" though. "Oh FFS why are you still using this broken POS? It's been deprecated for years, switch already!" is not a good comment, no matter what the intentions of the commenter are.