Re: Finding Unused Variables
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Finding Unused Variables

From: <ralphNOSPAM@primemail.com>
Date: Wed Oct 12 2005 - 06:20:20 CEST

On Tue, 11 Oct 2005 18:45:23 +0200, Janwillem Borleffs
<jw@jwscripts.com> wrote:

>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

I ran your script but it didn't display anything!
Received on Tue Oct 18 02:40:30 2005