title: phpDocumentor @global and @name question
body: <p>First day I use <a href="http://phpdoc.org/" rel="nofollow noreferrer">phpDocumentor</a> and so far so good, but I have a question that I didn't catch in the manual... The documentation of global variables.</p>
  
  <p>How would I document this code if:</p>
  
  <ol>
  <li>$someGlobalVar is <strong>not</strong> decalren in the PHP file of the class (it can even be undelared).</li>
  <li>$someGlobalVar is declared like this: <em>$someGlobalVar = array();</em> (not using the superglobal array like in the phpDocumentor manual).</li>
  </ol>
  
  <p>The PHP code:</p>
  
  <pre><code>class myCustomClass
  {
      private $someProperty;
  
      //I want to document the use of global var in this method
      public function getSomeProperty()
      {
          global $someGlobalVar;
  
          if (isset($someGlobalVar))
          {
              //...
          }
          else
          {
              //...
          }
      }
  }
  </code></pre>
  
  <p><strong>Edit:</strong> I want do document these globals as the manual shows but I'm not sure how/where to put the @global and @name tags.</p>
  
  <p><strong>Edit 2:</strong> I ended up using the following snippet just before the declaration of getSomeProperty:</p>
  
  <pre><code>/**
   * Get some property based on the $someGlobalVar global.
   * @global array $someGlobalVar User defined array that bla bla bla.
   * @return mixed Return a result bla bla bla.
   */
  </code></pre>
  
  <p>I use phpDocumentor syntax so that the <a href="http://www.netbeans.org/" rel="nofollow noreferrer">NetBeans IDE</a> display inline help in the source code. All seems right in NetBeans but I'm not sure it's the way to do...</p>
  
  <p>Anyone can confirm it's OK?</p>