Posted by Janwillem Borleffs on 10/11/05 19:45
ralphNOSPAM@primemail.com wrote:
> Is there a PHP script that can find unused variables? I'd like to
> 'clean up' my scripts.
>
> Thanks...
>
There must be out-of the box scripts out there, try Google to trace them
(e.g. by searching for php+checkstyle).
Meanwhile, I have been playing around a bit and created the following
(probably useless) script, which uses the simple criteria "if the var is
mentioned once, it must be unused".
The source:
http://playground.jwscripts.com/double-vars.phps
Enjoy :-)
JW
[Back to original message]
|