From: Per Jessen on
Gary . wrote:

> Yeah. There are static checkers out there, even some FOSS ones. I
> guess I'm just a bit frustrated that (as you say) the man page says
> that "-l" checks syntax but doesn't really detail what kind of things=

> that covers.=20

It really is _only_ the syntax. Same goes for e.g. the C lint -=20

int main()
{
char *p;

p=3D0;
*p=3D0;
}

this is 100% syntactically correct, but will core dump if you run it.=20=



--=20
Per Jessen, Z=C3=BCrich (24.2=C2=B0C)

From: "Gary ." on
On 7/6/10, Per Jessen wrote:
> It really is _only_ the syntax. Same goes for e.g. the C lint -

Sorry, but that's not what I remember from my C days, nor what wikipedia
says "lint was the name originally given to a particular program that
flagged some suspicious and non-portable constructs (likely to be bugs)
in C language source code." In fact, what would be the point of a C lint
that does that? It's already done by the parsing/syntactical analysis
part of the compiler, there'd be no point writing a separate program
(lint) to do that.

Anyway, yeah, I accept that that (syntax checking only) is what php -l
does, even if I think it's wrong, or at least incorrectly described :)

> --
> Per Jessen, Zürich (24.2°C)

It feels warmer than that today. Maybe it's because my code isn't
working X(
From: Peter Lind on
On 2 August 2010 12:05, Gary <php-general(a)garydjones.name> wrote:
> Okay, I'm resurrecting this because I just found something I consider to
> be strange in the documentation. Under the -l option at
> http://php.net/manual/en/features.commandline.options.php it says
>
> "This option won't find fatal errors (like undefined functions). Use -f
> if you would like to test for fatal errors too."
>
> Okay, but.. umm... "-f"? Really? That doesn't make any sense, given what
> -f is for (actually running the script). Documentation bug, or is my
> brain failing to work today?

Sounds like a roundabout way of saying "You can only find run-time
errors (such as undefined functions) by actually running the script".
Could definitely need some clarification

Regards
Peter

--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>
First  |  Prev  | 
Pages: 1 2
Prev: Question about the Board
Next: cache_control_limiter