PHP Enhancements for array and object

Hi guys, 

I'm new on PHP Storm, I come from Netbeans, and I'm still valuating pro and cons; I have found, more or less, the same thins but I don't know if in PHPStorm there is a very useful and simple "php enhancement"; in NB, if the variable is an object, if you type "-", the editor add the ">".


$var = new Class();

$var-  << in the time I digit "-", the editor write "->"

The same with array; if I type "=" to write the value of an array, the IDE add the ">"

$arr = [

  'key' = <<< netbeans add immediatly ">"


It bould be very stupid but I found it very useful, if you write tons of line of code :)


Is there a way to add this "smart keys" in phpstorm?


PS: object autocomplete actually works only for "$this" inside an object; you type "-", the editor replace with "->", but it dows not work outside.







1 comment

Hi there,

There are no such functionality in PhpStorm.

  • For -> auto completion for any variable (not just $this) watch this ticket: (star/vote/comment to get notified on any progress)
  • For => auto completion -- I do not remember seeing such ticket -- feel free to create one if you will not find one yourself

Please sign in to leave a comment.