Wicked - that's the best tip I've seen for a long time... TA


Gareth Williams wrote:

Well if you are a unix/linux/os x user, drop to the command line, go to the directory with all the php files, and type in:


grep <function_name> php

or if your php files are scattered around a load of sub-directories, then go to a directory which sits above all your php files, and type in:

grep -r <function_name> *

if your function is only declared and not used, you will only get one line back (plus a line for each comment line which might have the function name in it.



On 18 Feb 2004, at 15:58, Al wrote:

Anyone have a suggestion for how I can determine if I have any orphan functions in a function file?

I have a include file with about 30 functions that I have been adding to for several months. No doubt some have been superseded, etc. and are now obsolete.

I could laboriously trace every path in my code and find the orphans; but, it would be nice to be able to automate the job a bit.
Is there a neat way to run my applications and record which functions are used?


Thanks....

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



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



Reply via email to