how find php.ini in php code example
Example 1: how to find php.ini
php -i | grep "Loaded Configuration File"
Example 2: find which php.ini is used
for cmd : php --ini
for code : use php_ini_loaded_file() as :=
$inipath = php_ini_loaded_file();
if ($inipath) {
echo 'Loaded php.ini: ' . $inipath;
} else {
echo 'A php.ini file is not loaded';
}