I'm debugging a client's 3500-line PHP file. Including this file causes a PHP Parse error: syntax error, unexpected $end in ...
error, so I'm assuming there's a missing brace somewhere. Is there a simple tool or method for missing brace discovery, either online or in the Komodo IDE I'm using?
Use consistent and clean tabbing. I've found that makes it very hard to miss a closing brace.
Other than that, you've kinda dug your own grave here. What are you coding that results in a 3500-line PHP file?
EDIT: Try dumping your code into Notepad++. I'm fairly sure that will highlight the associated closing brace if you click on the opening one, but with larger files, I've gotten somewhat unreliable performance with this.
another option (similar to notepad++) is to use Dreamweaver to find the associated closing tag.
See this link: How do I make Dreamweaver to show me closing tags?
in dreamweaver:
To select matching opening and closing curly braces, brackets, or parentheses, click inside the opening or closing symbol, and click the Balance Braces button on the Coding toolbar (it's immediately below Select Parent Tag). Alternatively, use the keyboard shortcut, Ctrl+'/Cmd+'.
Use NetBeans IDE for PHP.
http://netbeans.org/features/php/
Will check your syntax and highlight issues amongst the many other nice features it has. And it's free.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With