If you would like to see the PHP's current configuration using the -i switch from the shell command line with php.ini specified, then the order of arguments is important. Putting -i after -c gives the intended result.
Info is printed out for the default php.ini (cli)
$ php -i --php-ini /etc/php/7.4/fpm/php.ini | grep -i "loaded conf"
Loaded Configuration File => /etc/php/7.4/cli/php.ini
Info is printed out for the desired php.ini (fpm)
$ php --php-ini /etc/php/7.4/fpm/php.ini -i | grep -i "loaded conf"
Loaded Configuration File => /etc/php/7.4/fpm/php.ini