First you need to check if the extension is already enabled for that specific PHP installation via the following command: (Here I will use the ioncube_loader as the example extension and alt-php72 as the example PHP version):
selectorctl --list-extensions --version=7.2 | grep -i ioncube_loader
- ioncube_loader
Plus sign (+) stands for 'enabled', minus (–) for 'disabled', tilde (~) means compiled into interpreter. Enabled and disabled state relates to presence in /etc/cl.selector/defaults.cfg file.
So the extension is not enabled here and we need to enable it via this command:
selectorctl --enable-extensions=ioncube_loader --version=7.2
And now if we check the status again we will see that the extension is indeed enabled:
selectorctl --list-extensions --version=7.2 | grep -i ioncube_loader
+ ioncube_loader