Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 205269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:32:29+00:00 2026-05-11T17:32:29+00:00

I tried using PHPDoc for the first time today and quickly ran into a

  • 0

I tried using PHPDoc for the first time today and quickly ran into a problem.

For every 1 line of variable declarations, I had at least 5 lines of comments. Example:

/**
 * Holds path the remote server
 * @name ...
 * @global ...
 */
 $myvar = ...

Of course, the payoffs are nice – but this turns a 10-line config file into a 60-line file. Takes me forever to fill out, and I’m not yet convinced it adds that much over a simple one-liner.

It also throws a kink in my workflow. All is fine and good until I need to make sweeping changes. With my well-documented doc-blocks, all of a sudden I no longer have to refactor my code, but I need to re-write all these tedious details. Wait til the end you say? HAH! Then documentation will never happen.

On top of it all – it forces me into C-style /**/ comments in the middle of my code. This drives me crazy during development since it strips the ability to comment out large blocks on demand. Now to comment out a a large block of code, I need to pull something like :range,s/^/#/ ; then undo it later. Annoying!

Long story short – I like PHPDoc, I love well documented code – but 5 lines of comments for every one line of code is far too much!. Are there features I’m missing? Is this a common problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:32:29+00:00Added an answer on May 11, 2026 at 5:32 pm

    Whether or not it’s overkill depends largely on the intended use of your application. If you’re writing an app that will only be used by a single company or group, you probably don’t need exhaustive documentation of every single variable.

    For example, right now I’m working on a project with a fairly extensive code base but very few developers (for now, just me). I’m adding PHPDoc blocks for two things: classes and methods. For everything else, I comment frequently, but not in verbose PHPDoc format. Most of this code will only ever be seen by three or four people, and the information they’re going to need is black box info: what do I send to this method, what do I expect to get out of it. They want to know how to get data from a Model, not what an private class variable is for.

    If I were writing an app that I intended to distribute to other developers or companies, and I expected them to integrate my app with other systems or extend its functionality, I would place more value on more extensive PHPDoc use. That kind of detail could definitely come in handy during long-term maintenance.

    Case in point, my current project will at some point require the creation of an API to be accessed from other sites. You can bet that API will have more comments and written documentation than lines of code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It was not how I wanted to do it, but… May 12, 2026 at 12:43 am
  • Editorial Team
    Editorial Team added an answer A synchronized method uses the method receiver as a lock… May 12, 2026 at 12:43 am
  • Editorial Team
    Editorial Team added an answer Like so: XDocument doc = XDocument.Parse(xml); var qry = from… May 12, 2026 at 12:43 am

Related Questions

I tried using the Microsoft ReportingControls but found them overly cumbersome, with too little
I tried using "cap rollback" but I get the following error: $ cap rollback
I tried using the Process class as always but that didn't work. All I
I tried using both HTTPService and URLRequest / URLLoader . But I can't figure

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.