php -r 'foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1])) as $f) { if($f->isFIle() && substr($f, -4) == ".php") { foreach(token_get_all(file_get_contents($f)) as $t) {if(is_array($t) && ($t[0] == 263 or $t[0] == 265)){ echo $f, PHP_EOL;}}}}' .
windowsユーザはシングルクオートとダブルクオートは逆にしてね
おまけ:該当行表示版
find ./ -name "*.php" -exec php -r 'foreach(token_get_all(file_get_contents($argv[1])) as $t) { if (is_array($t) && in_array($t[0], [T_LOGICAL_OR, T_LOGICAL_AND])) {echo $t[2], "\t", $argv[1], PHP_EOL, file($argv[1])[$t[2] -1];}};' {} \;
実行結果
76 ./library/Zend/Filter/File/Decrypt.php
if (file_exists($this->filename) and !is_writable($this->filename)) {
76 ./library/Zend/Filter/File/Encrypt.php
if (file_exists($this->filename) and !is_writable($this->filename)) {
117 ./library/Zend/Filter/Encrypt/Openssl.php
if (is_file($key) and is_readable($key)) {