Which php.ini file is used for the command-line interface (CLI) in PHP?
To find the path to php.ini file, which is used for CLI, use the command php with option -i.
For this purpose, execute the following commands:
php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /usr/local/etc Loaded Configuration File => /usr/local/etc/php.ini