Hello @kartik,
You can get a full phpinfo() using :
php -i
And, in there, there is the php.ini file used :
$ php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
On Windows use find instead:
php -i|find/i"configuration file"
Hope this is helpfull!!
Thank You!!