phan -f filelist.txt
I generated my filelist.txt
files with a little help from grep – by looking for all files with opening PHP tags in, and putting that list of filenames into a file. My command looks like this:
grep -R -l "<?php" * > filelist.txt
This simply greps recursively (the -R
switch) in all files looking for <?php
and when it finds it, outputs only the filename (the -l
switch does that bit). Then I just put all the output into my filelist.txt
file.
Phan is in its early stages but it’s ready for you to run on your own projects. Look out that you may need to put your bootstrap or other include files first in the filelist.txt
file if phan isn’t finding things in the right order – luckily with it all in one file, it’s relatively easy to move things around if you need to.