目录
- 47.1. php function check
- 47.2. whois 域名查询
- 47.3. 身份证校验
- 47.4. PHP PDF 处理库
- 47.5. Kint - a modern and powerful PHP debugging helper
- 47.6. snoopy 模拟浏览器操作
- 47.7. PHP Nightrain
47.1. php function check
#!/bin/bash LOGFILE=/tmp/my.log echo > $LOGFILE for helper in `ls -1 class/helper/` do echo ========================== $helper ============================ >> $LOGFILE class=`grep '^class' class/helper/$helper | awk -F ' ' '{print $2}'` for fun in `grep 'public function [a-zA-Z]' class/helper/$helper | awk -F ' ' '{print $3}' | awk -F '(' '{print $1}'` do count=`grep -r "$class->$fun(" *|wc -w` if [ $count == 0 ]; then echo "[ unused ] $class->$fun" >> $LOGFILE else echo "[ used ] $class->$fun" >> $LOGFILE fi echo "[`date`] [$helper] $class->$fun (checked: $count)" done done
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。