966

Answer

Solution:

There is a difference between a regular php comment (/* ... */) and a DocBlock (/** ... */) (or PHPDoc).

PHP Interprets both as comments, however when using IDE's - they can parse the DocBlocks and provide you a better programming experience (with type-hints and autocomplets), and if you want you can use them to export a complete documentation of your code (packages/classes/functions/etc).

If you take for example this code:

<?php
 /**
  * A summary informing the user what the associated element does.
  *
  * A *description*, that can span multiple lines, to go _in-depth_ into the details of this element
  * and to provide some background information or textual references.
  *
  * @param string $myArgument With a *description* of this argument, these may also
  *    span multiple lines.
  *
  * @return void
  */
  function myFunction($myArgument)
  {
  }

You can see that the functionmyFunction doesn't return anything (@return void) and it only accepts one parameter ($myArgument) which supposed to be a string.

To export a complete documentation you can use the phpDocumentor tool.

People are also looking for solutions to the problem: php - How to match the last segment of the URL (string)?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.