PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 27, 2022

[FIXED] Technical name for long descriptive code block before classes, functions, etc

 January 27, 2022     comments, php, standards     No comments   

Issue

I know that in PHP (like many other languages) people add descriptive comment blocks with stars before each line before classes, functions and files. Do they have any official name?

/**
* 
* Do these types of bullet-ed block comments have any official name?
* 
*/

Solution

This comes from Java's context, called JavaDoc, where you give a paragraph of details, including but not limited to, parameters, return values, etc.

In case of Java...

A documentation comment is framed by slash-star-star and star-slash (i.e. /** ... */). The documentation is in the HTML format.

The HTML format is then rendered by the Eclipse or Netbeans, or other similar IDEs as a tip for the particular function.

The JavaDoc is just the name, but it can be used for any languages.

An example of JavaDoc being using for hinting in Eclipse (code assist) is:

In NetBeans, when the documentation is not found in PHP:

In NetBeans, using PHPDocs:


(source: netbeans.org)

And it displays in NetBeans this way:



Answered By - Praveen Kumar Purushothaman
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing