[FX.php List] Suggestions on finding parse errors in long PHP pages

Joel Shapiro jsfmp at earthlink.net
Wed Nov 28 11:59:03 MST 2007


Hi

Quick plug for TextMate if you're on a Mac:

- if you type something within php code that is not recognized as a  
php function or a string within quotes, the text shows as red to  
alert you that "cho" is probably a mistake. (I don't know if BBEdit  
does this too)

- you can allow TextMate to automatically give correct structure and  
punctuation to various functions, making it much less likely to miss  
a closing bracket, etc.
e.g.  type "if" (no quotes) and then tab, and TextMate gives you:
if (condition) {
	# code...
}

macromates.com

-Joel


On Nov 28, 2007, at 10:40 AM, Bob Patin wrote:

> Jonathan,
>
> I found it on line 383 (the parse error said line 294): instead of  
> "echo" I'd typed "cho".
>
> So would BBEdit show things on their correct lines?
>
> BP
>
>
> On Nov 28, 2007, at 12:32 PM, Jonathan Schwartz wrote:
>
>> Bob,
>>
>> This is always a lot of fun.
>>
>> If the error isn't on the line number offered, then we are talking  
>> missing "}" in a if statement, no?
>>
>> If so, I use the latest version of BBEDIT that offers the ability  
>> to visually see in the Margin, the symbols indicating opening and  
>> closing if statements.  Although it doesn't wave at you, it is  
>> just a matter to narrow down the location of the mssing closing  
>> bracket.
>>
>> Not sure if that is the issue for you.  HTH.
>>
>> If you find a more intelligent method, I'd love to hear.
>>
>> Jonathan
>>
>>
>> At 12:21 PM -0600 11/28/07, Bob Patin wrote:
>>> I have a form that has embedded PHP all the way down, on approx.  
>>> 40 survey questions; now that I managed to get to the bottom of  
>>> the form and test it, I'm getting a parse error.
>>>
>>> The problem is that the error msg. lists a line that isn't  
>>> relevant to the actual lines of the code; do you guys have a way  
>>> to take the parse error line # and interpolate it so that it  
>>> shows the actual error line?
>>>
>>> Thanks,
>>>
>>> Bob Patin
>>
>> -- 
>> Jonathan Schwartz
>> Exit 445 Group
>> jonathan at exit445.com
>> http://www.exit445.com
>> 415-381-1852
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list