<?php
$dir = new RecursiveDirectoryIterator('c:/wamp64/www/rey/SufarmaERP');
$iterator = new RecursiveIteratorIterator($dir);
foreach ($iterator as $file) {
    if ($file->isFile() && $file->getExtension() === 'php') {
        $content = file_get_contents($file->getPathname());
        if (stripos($content, 'movimientos_inventario') !== false) {
            echo $file->getPathname() . PHP_EOL;
        }
    }
}
