第 47 章 Miscellaneous

简介:

目录

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 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
strange behavior:why u31000 is accessed for Extension project
Created by Wang, Jerry, last modified on May 20, 2015
109 0
strange behavior:why u31000 is accessed for Extension project
|
关系型数据库 MySQL
|
PHP 开发工具 git
|
关系型数据库 MySQL
|
JSON 数据格式
|
JSON 数据格式
|
JavaScript 内存技术 前端开发