How to install php extension using pecl for alternative php version ( with muliple php installations in system )?

If you have ispmanager or  cpanel or plesk installed and maybe you have mupli php versions installed in your linux system then you need to install specific php extension for specific php version like this using pecl

for example for php8.2

/opt/php82/bin/pecl -d php_suffix=8.2 install apcu