0
No, the @return string
is only documentation of the method, in format Docblock. Your IDE and other tools, for example, the Phpdoc, use these special comments to give you information of what the code does.
In this case, the @return
is indicating what type of value the function returns, which is string.
You can delete the entire comment, but I recommend you use this feature to comment on your personal code.
The different color is the IDE that understands Phpdoc and "paints" differently to indicate that it is something "special".
When you are writing a call to that function, the IDE will display a tooltip that will use those comments to let you know how to use it.
In this case no. this is just a comment that means the return type of the method
errorMessage
. You can erase everything inside the/**
until*/
the code will continue working. The color depends a lot on the theme of your editor has no way to answer this without knowing the theme!– novic