As already pointed out, PhpStorm will use regular phpdoc blocks:
/** @var ClassName $object */
However, since 2.1 it also supports Netbeans/Eclipse/Zend @var annotations:
/* @var $object ClassName */
Please note the comment starts with /*
rather than /**
(thus it won t show up if you generate actual documentation with phpdoc). Also, the arguments are swapped, though PhpStorm accepts any order:
/* @var ClassName $object */
Last but not least, they can precede almost any arbitrary line of code (technically, phpdoc blocks are restricted to certain items).
Edit: as of 2019, Netbeans/Eclipse/Zend @var annotations seem to be mostly abandoned. NetBeans 11 no longer supports them and in general they aren t supported by other IDEs. I suggest to use the other syntax.