Rob van der Woude's Scripting Pages

Help text for CheckVarsPHP.cs

(view help text of CheckVarsPHP.cs as plain text)

CheckVarsPHP.exe,  Version 1.02
Check PHP code for unused variables and functions

Usage:    CheckVarsPHP.exe  "phpfile"  [ /F | /V ]  [ /U ]

Where:    "phpfile"         is the PHP file to be examined
          /F                tests Functions only
                            (default: functions as well as variables)
          /V                tests Variables only
                            (default: functions as well as variables)
          /U                list Unused functions and variables only
                            (default: list all functions and variables)

Notes:    If functions are tested, a (limited) test for nested functions
          and unterminated curly braces is performed as well.
          In PHP variables are not declared, so a single occurrence of a
          variable means it is not used, unless it is a superglobal which
          may be declared elsewhere. Keep in mind though, that this program
          does not take into account the variables' scope, so a variable
          name used once in two functions may in fact be unused but will
          escape detection by this program.
          The program's return code equals the number of unused functions
          and/or variables, or -1 in case of (command line) errors.

Written by Rob van der Woude

page last uploaded: 2022-10-05; loaded in 0.0186 seconds