How to remove comments and empty lines from a `php.ini`?

sed -i -r '/^[\s\t]*[#;]/d' php.ini
sed -i -r '/^\s*$/d' php.ini

See also: How to remove the # comments and empty lines from a configuration file?

For all files in the current folder:

find . -type f -exec sed -i -r '/^[\s\t]*[#;]/d' {} +
find . -type f -exec sed -i -r '/^\s*$/d' {} +