FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » request for error checking feature
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: request for error checking feature [message #184085 is a reply to message #184048] Wed, 04 December 2013 20:19 Go to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Tue, 03 Dec 2013 16:52:05 -0500, richard wrote:

> How about making it so that when you check documents for errors, ALL of
> the errors get listed in one shot!
> I'm tired of having to correct errors one by one.
> Correcting errors one at a time, uploading, and doing that a few hundred
> times is tedious, time consuming, and damn boring.
>
> And knowing more precisely what caused the error.
> e.g. ""theme song"" generates Parse error: syntax error, unexpected
> T_CONSTANT_ENCAPSED_STRING, expecting ')
>
> WTF does that mean?
> Why can't it just say "Double quotes not allowed here".

Because the error is not "double quotes not allowed here".

Double quotes, or to be more accurate a zero length string literal, is a
perfectly valid string anywhere that a string is allowed.

The error is the word theme that appears after the empty string literal.

The php interpreter does not know that you intended theme song to be a
string literal, it knows that it has a string literal (which happens to
be a zero length string) followed by unexpected words that match the form
of constant names (not being variable names or reserved words).

The interpreter will not try and guess what you wanted to do when your
syntax is broken. In addition, it stops at the first error because it
makes no sense to try and carry on processing.

If you knew what you were doing, you might try:

php -<some command line arg here> filename.php

but I'm guessing that you don't even know what the word you need to
search for to try and find which command line argument to use is.

Hint: It's on this web page:

http://www.php.net/manual/en/features.commandline.options.php

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: illegal offset problem
Next Topic: odd iframe problem
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 18:46:54 GMT 2024

Total time taken to generate the page: 0.03944 seconds