Answer the question
In order to leave comments, you need to log in
What are comments before class functions in php used for?
For example:
/**
* __invoke
*
* access public
* @param \ZfcUser\Entity\UserInterface $user
* @throws \ZfcUser\Exception\DomainException
* return String
*/
How is it used and where?
Answer the question
In order to leave comments, you need to log in
Well, firstly, the comments are useful for other developers to understand what is happening there.
But these specific comments are used to automatically generate documentation for your application. There are special scripts that can do this. For example the oldest and most famous phpDocumentor
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question