NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
$_SERVER
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
When i type

$_SERVER['

can you please show a pop up of valid $_SERVER vars (http://php.net/manual/en/reserved.variables.server.php), rather than a mile long list of random text (?)


Dreamweaver has this feature, and i'm really missing it Sad

This would save me tons of time. Thank-you.
View user's profileFind all posts by joebSend private message
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
Still missing from V10 of phpED- not impressed.
View user's profileFind all posts by joebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7875
Reply with quote
You must be joking.
Support for indices in $_SERVER as well as for user-defined indices is there for many years.
If you mean that the list contains too many indices, that's true. It contains all indices used in your project.
Probably, we'd show pre-defined first. We'll do in a future version.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
Typing $_SERVER[' brings up a massive list of variables, not just the ones that should be shown for $_SERVER, so no, i am not joking.
View user's profileFind all posts by joebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7875
Reply with quote
And if you start typing what you need, the list will quickly become short enough, right? If you click Ctrl-Space, you'll see all variables, all classes etc - a very long list. You do not wonder why it's so long. Right?
BTW I mentined that it's possible to improve situtation, but it's not possible to remove all indices -- any of them may appear in $_SERVER - because it's just a pre-filled array and you can assign anything to it.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
I know that anything can be in the $_SERVER variable, but the indexes i'd expect to see in a popup list when i
type

$_SERVER['

are the ones that are documented in PHP:

http://php.net/manual/en/reserved.variables.server.php

If my program has this line in the code:

$_SERVER['APPLES_AND_PEARS']

Then i'd expect PHPEd to also show that index too.

The server can add stuff at runtime to this variable; obviously phpEd cant know this.
View user's profileFind all posts by joebSend private message


Joined: 30 Jun 2009
Posts: 79
Reply with quote
I did bring this up a few months back.

See this thread:

http://forum.nusphere.com/associative-array-key-name-autocomplete-t8963.html

Essentially, it's not a bug, it's a feature. Good luck trying to convince them otherwise.
View user's profileFind all posts by temuriSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7875
Reply with quote
In-general tracking all possible indices that may appear in a particular variable is just impossible due to dynamic nature of php.
It's not about assigning something to $_SEVER['APPLE']. What if code passes $_SERVER as a reference to some function an method and this method assigns something to this variable at some index name stored in another variable?
Even if we track all possible branches in the algorithm in resonable time, it would take huge storage to keep list of possible indices for all variables. It just makes no sense because this very tiny benefit will come under cost of very slow performance and huge resouce and CPU consume.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
I don't want you to track all possibilities- Just show the ones that are supposed to be there as defined in the PHP manual.

Gerr Rolling Eyes
View user's profileFind all posts by joebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7875
Reply with quote
we show them, among all other possibilities.
Quote:
If my program has this line in the code:

$_SERVER['APPLES_AND_PEARS']

Then i'd expect PHPEd to also show that index too

If not tracking, what else did you suggest here?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
Indeed you do, in a list that also has hundreds of other values. (pointless and a waist of time). Im not going to search through hundreds of index names that are totally unrelated.. thats just plain silly.

Basicly, every time i want to use a $_SERVER predefined index in PHPEd, i have to go to the PHP website, and look up what the index is called, as i cant remember them. Not a very quick solution.

In Dreamweaver, i type $_SERVER[' and it shows me the server index names as defined in the php manual.
Its actually quicker for me to pause using phpEd, open DW, open the file im working on. Use DW to show me the indexes, then close DW and return to phped!! Thats totally insane.


I just don't understand why you think a list of a hundred different unrelated indexes is acceptable? It's not. Listen to your customers. What you think is ok is fine, but you don't pay for the software; you write the software for your CUSTOMERS.

Are you not reading what i'm writing (and what others are writing) ?

Maybe you just don't understand... This is very frustrating indeed.
View user's profileFind all posts by joebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7875
Reply with quote
First you want to see standard indices. That's clear. Then You also want to see whatever indices are added in user code. That's also clear. It means tracking of what is assigned. I replied that this is a waste of resorces -- CPU, memory and time -- very consuming way. We are not going to follow it.

As of long list of indices -- I replied how we may improve it. Please read that first (I belive you didn't read)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
$_SERVER
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  

  
  
 Reply to topic