NuSphere Forums Forum Index
NuSphere Forums
Reply to topic

Would others find this a useful feature?
Yes please
85%
 85%  [ 6 ]
No thank you
14%
 14%  [ 1 ]
Total Votes : 7

Visible indication for undeclared/non-assigned PHP variables


Joined: 07 Jun 2011
Posts: 3
Reply with quote
Hello,

I love NuSphere's PHPEd but one useful feature which I have seen in other PHP IDEs which I found missing in PHPEd is visible feedback to indicate undeclared / non-assigned variables. Although it is useful that variables in PHP do not need to be declared, one of the most common mistakes is to mis-type a variable name. Editors like PHP storm display variables used in statements which have not been previously assigned a value in gray. This way it is easy to spot immediately when you have mistyped a variable name or forgot to assign it a value, as normally all variables are assigned a value before they are used.

Example:
Code:

public function showInformation() {
  $first_name = "Pete";
  echo $first_name . " " . $last_name;     //$last_name would be shown in gray as it hasn't been assigned a value yet
}

Would this be something which could be added to the Editor to make it even more useful than it is now?

Many thanks
Jitse
View user's profileFind all posts by djitszSend private message
Visible indication for undeclared/non-assigned PHP variables
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 1  

  
  
 Reply to topic