NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Syntax Error Checking & Other Misc Features
Damien H
Guest

Reply with quote
I've been trying out a Variety of IDE's for PHP, and so far, I've only found one with this feature.

Zend Studio has a Syntax Error Checking feature that is continuous while running, that I really liked.

For example if I had

Code:

if ($variablename == 0) {
   $result = mysql_query ($query) or die (mysql_error ())
   if ($result) {
   }
}


it would underline the "if ($result)" with something similar to the red underline used for Microsoft Word for a misspelled word to let me know I have a synax error somewhere around there. I found it very handy for easily debugging problems before they even got started.

Also, another feature I enjoyed in Zend is the highlighting of brackets, braces, parentheses, quotes, and other enclosing marks, only while you were under them to identify the matching enclosing mark.

So for example. If my cursor was under the last bracket in this snipet, it would have highligiting similar to this

Code:

if ($variablename == 0) [b][color=cyan]{[/color][/b]
   $result = mysql_query ($query) or die (mysql_error ());
   if ($result) {
   }
[b][color=cyan]}[/color][/b]


This allowed for easy checking of enclosing marks to make sure you were in the correct place. However, it did not highly every single enclosing mark in the code, only the one you were currently under.

By far, phpED has been the best PHP IDE I've located as of yet, and these two features would make it absolutely perfect for my needs. Do you have plans to implement any of these features, and are there any times tables as to when these could be implemented.

Thanks,
Damien H
Komodo from Active State also has this feature.


Joined: 07 Aug 2005
Posts: 1
Reply with quote
Komodo also has the dynamic syntax checking feature which I truely miss in PhpED. On the plus side for PhpED, the product is much more stable then Komodo and the debugger works much better with forms based pages.
View user's profileFind all posts by ishapiroSend private message


Joined: 09 Dec 2003
Posts: 92
Reply with quote
PhpED does show the matching braces... See settings > Editor settings > Show matched brackets.

As to the "red underlining", PhpEd 4 will come with it.
View user's profileFind all posts by mpSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Correct...
One little point Smile The orginal post was made in 2003 when PHPED did not highlight the matched brackets Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 06 Jul 2009
Posts: 72
Reply with quote
I was playing about with Zend Studio out of curiosity (it's ghastly overall, and I won't be leaving PhpED for that anytime soon).. but I really did like the syntax checking as it highlighted a few issues I hadn't noticed in some of my code. By this I mean that it highlights the file in a project that has errors. It was nice to be able to look down the list of files and load up the ones with warnings / errors and address them.

Would also be nice to extend the current syntax checking to the likes of warning and notice checking too.. so that you're also alerted of undefined vars and the likes.

Would really like to see these features added to the project list in PhpED too.. especially the former.



Cheers..

Ian
View user's profileFind all posts by Ian.HSend private message
Syntax Error Checking & Other Misc Features
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