According to :help ft-php-omni
, the default omnicomplete script for PHP (the one that is part of the standard vim distribution) only completes class names after the new
keyword. Does that work?
If you want method completion to be restricted to the correct class, then you may have to add hints in the comments. The docs include the example
/* @var $myVar myClass */
$myVar->