Re: More toroughly checking a script before execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rasmus Lerdorf wrote:
Sounds like you just need to turn on E_NOTICE.  At least for your
variable access stuff assuming your test case actually hits that part of
the code.

I was talking about finding the problems bevore executing the code.

If you are talking about complete code coverage letting you catch any
such mistyped variables or functions, that is simply impossible to do at
that level because variables and function names can be defined at
runtime.

I know it's impossible to catch all cases, I mentioned this in my post. Neverthless it would help to find out basic prolematic zones.

Just because a function doesn't exist at compile time doesn't
mean that it won't be created before the call to it at runtime.  And it
doesn't need to be as complicated as you make it out to be with your
variable variable example.  A simple conditional include completely
changes the nature of everything at runtime.

What you really need is to create decent regression tests and use a code
coverage tool to make sure your tests cover your code well.  Xdebug can
do the code coverage check for you.

I guess you're refering to http://www.xdebug.org/docs-functions.php#coverage . I didn't knew about it and I'll take a look if it can help me with my problem, thanks!

- Markus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux