PHPDocument code comment standard writing summary

Source: Internet
Author: User
PHPDocument code comment standard writing summary

  1. /**

  2. * File name (sample2.php)
  3. * By bbs.it-home.org
  4. * Function description (omitted)
  5. * @ Package sample2
  6. */

  7. /**

  8. * Contains files
  9. */
  10. Include_once 'sample3. php ';

  11. /**

  12. * Declare global variables
  13. * @ Global integer $ GLOBALS ['_ myvar']
  14. * @ Name $ _ myvar
  15. */
  16. $ GLOBALS ['_ myvar'] = 6;

  17. /**

  18. * Declare a global constant
  19. */
  20. Define ('num', 6 );

  21. /**

  22. * Class name
  23. *
  24. * Class function description
  25. *
  26. * @ Package sample2
  27. * @ Subpackage classes (if it is a parent class, add it)
  28. */
  29. Class myclass {

  30. /**

  31. * Declare common variables
  32. *
  33. * @ Accessprivate
  34. * @ Var integer | string
  35. */
  36. Var $ firstvar = 6;

  37. /**

  38. * Create a constructor {@ link $ firstvar}
  39. */
  40. Function myclass (){
  41. $ This-> firstvar = 7;
  42. }

  43. /**

  44. * Define functions
  45. *
  46. * Function description
  47. *
  48. * @ Global string $ _ myvar
  49. * @ Staticvar integer $ staticvar
  50. * @ Param string $ param1
  51. * @ Param string $ param2
  52. * @ Return integer | string
  53. */
  54. Function firstFunc ($ param1, $ param2 = 'optional '){
  55. Static $ staticvar = 7;
  56. Global $ _ myvar;
  57. Return $ staticvar;
  58. }
  59. }
  60. ?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.