如何获取PHP关联数组索引的智能感知? [英] How to get intellisense for PHP associative array index?

查看:77
本文介绍了如何获取PHP关联数组索引的智能感知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
PHPDoc用于参数的变长数组

Possible Duplicate:
PHPDoc for variable-length arrays of arguments

每当我键入$_SERVER['']并按Ctrl +空格键,它就会为我提供可能的索引列表.如何使我创建的数组成为可能?

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?

推荐答案

$_SERVER的代码完成为您提供了人们从该关联数组中获得的典型值的提示.它在NetBeans源代码中的某个地方进行了硬编码.对于任意数组,NetBeans不知道在任何数组中使用的键,因此在此不提供任何提示.甚至有可能证明不可能可靠地实现这样的目的.一个功能,所以我觉得您不走运.

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.

这篇关于如何获取PHP关联数组索引的智能感知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆