SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: phpdoc... what?

  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    phpdoc... what?

    Hi guys,

    What is the purpose of phpdoc?

    Thanks

  2. #2
    Web Professional
    Join Date
    Oct 2008
    Location
    London
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Generating code documentation from comments. You comment your code using a modified comment syntax and special phpdoc tags:
    PHP Code:
    /**
     * Some func
     *
     * Longer description
     *
     * @param string $in Input string
     * @return string Output string
     */
    function do_something($in) {
        
    // do something
        
    return $out;

    and then run phpdoc to generate a documentation in various formats (PDF, HTML, Windows Help, and many more).

  3. #3
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    It also allows the better IDEs out there to provide type hinting as you code.

    Very useful.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  4. #4
    Web Professional
    Join Date
    Oct 2008
    Location
    London
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SilverBulletUK View Post
    It also allows the better IDEs out there to provide type hinting as you code.
    Good point. I'm using phpDesigner and it parses phpdoc comments and when you place the cursor at a call to a function/method that has its phpdoc block then it displays its description, parameters and return. Very helpful.

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah, thanks guys.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •