Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get intellisense for PHP associative array index? [duplicate]

Possible Duplicate:
PHPDoc for variable-length arrays of arguments

Whenever I type $_SERVER[''] and hit Ctrl + Space it gives me the list of possible indexes. How can I make it possible to array's I've created?

like image 714
Almino Melo Avatar asked Nov 05 '22 20:11

Almino Melo


1 Answers

The code completion for $_SERVER gives you hints on the typical values people get out of that associative array. It is hard-coded somewhere in the NetBeans source code. For an arbitrary array, NetBeans has no idea of the keys that are used in any array, and thus does not provide hints there. It is even possible to proof that it is impossible to reliably implement such a feature, so I think you are out of luck here.

like image 79
Waldheinz Avatar answered Nov 09 '22 09:11

Waldheinz