This is a linux shell command which will comment all require_once calls from certain directory in php files:
% cd path/to/ZendFramework/library
% find . -name '*.php' -not -wholename '*/Loader/Autoloader.php' \
-not -wholename '*/Application.php' -print0 | \
xargs -0 sed --regexp-extended --in-place 's/(require_once)/\/\/ \1/g'
But how could I do that in Windows OS cmd?
This is to speed up a Zend Framework application.
EDIT:
On one line:
find . -name '*.php' -not -wholename '*/Loader/Autoloader.php' -not -wholename */Application.php' -print0 | xargs -0 sed --regexp-extended --in-place 's/(require_once)/\/\/ \1/g'
With this and this.
FYI, on Windows, I could not get xargs working for some reason, but this is the command I ran through Git Bash shell:
Then, manually recopy the Loader.php and Application.php file back over the sedited ones.