List all PHP variables from one directory
If you work on a big PHP project you might forget which variables you have already used. This script will list all variables and their occurences
in the files with line numbers. It scans a complete directory including all subdirectories, but only php files (set $filter=false; to scan any file).
Change the file path at the beginning. The path must be accessible for your server (on default Apache cannot access any directory level above htdocs).
The script is very rough and has one major limitation:
It scans the whole file for $-expressions no matter if html, javascript, text, php, string expressions or whatever.
It is not intended to be perfect, just to forfil the purpose.
The output contains three parts:
- a listing of all variables. Click on them to see the line numbers (internal link)
- all vars sorted alphabeticalls with tables that contain the files and line numbers
- list of all successfully scanned files
Thanks for ideas about recursive directory scan at Lixlpixel.
Radiovibrations.com ->
PHP