R
R
roman_lyce2014-11-20 14:15:52
Documentation
roman_lyce, 2014-11-20 14:15:52

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

1 answer(s)
S
Sergey Romanov, 2014-11-20
@Serhioromano

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 question

Ask a Question

731 491 924 answers to any question