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 8501387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:11:57+00:00 2026-06-11T01:11:57+00:00

When using automatic php docblock generation in PhpStorm, I ended up with the @static

  • 0

When using automatic php docblock generation in PhpStorm, I ended up with the @static annotation on a static method:

/**
 * Reset the singleton instance, for the tests only
 * @static
 */
public static function reset() {
    self::$singletonInstance = null;
}

Is there any use for these tags if they can be inferred from the code? I’m trying to decide if I should leave it or remove it (and do so everywhere so it’s consistent).

  • 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-06-11T01:11:59+00:00Added an answer on June 11, 2026 at 1:11 am

    These tags were introduced for legacy PHP 4 code that didn’t permit the use of such keywords in code. With PHP 5, the code is effectively self-documenting, so these tags are indeed redundant; I don’t see any reason to keep them around.

    In fact, if you ever generate documentation for your PHP 5 source files, phpDocumentor should still be able to determine that these are static methods. This is mentioned in the phpDocumentor docs:

    Just using the static keyword in your code is enough for PhpDocumentor on PHP5 to recognize static variables and methods, and PhpDocumentor will mark them as static.

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

Sidebar

Related Questions

I am considering using Hudson as a dashboard for the automatic tests that are
I made a script in PHP which gets a value using get method and
I'm using automatic php class to gets the keywords from my website page content
i am using a php script to automate posts to twitter. the script to
I just converted an old project to ARC using Xcode's automatic refactoring. @property (nonatomic,
How can I rewrite he following code using C#3.0 automatic properties? private int _myValue;
How would I generate automatic bindings for a C project that is built using
I'm using c-support in Vim. One of it's features is the automatic comment expansion
One of the side-effects of using an external Subversion repository was getting automatic offsite
I have a php script that posts links to my facebook page wall using

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.