Define variable typing in NetBeans IDE
To define the variable type for a PHP variable for sake of auto-completion in NetBeans IDE, simply type the shortcut
vdoc
and press Tab
. This will generate a comment that looks like this:
/* @var $variable Example */
After that line in the same variable scope, you will be able to see auto-complete for methods and properties of Example
class when you type:
$variable->
This type-hinting is namespace friendly in PHP 5.3 and 5.4. I work mainly with PHP 5.3.
Written by Sam-Mauris Yong
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#