 <p>For autocompletion of dynamically created objects (if its type is not recognized automatically) most IDEs support type-hinting comments.</p> <p>For example:</p> <pre><code>/** @var Car $car */ </code></pre> <p>See <a href="http://www.phpdoc.org/docs/latest/references/phpdoc/tags/var.html" rel="nofollow">http://www.phpdoc.org/docs/latest/references/phpdoc/tags/var.html</a></p>