The Webmin / Virtualmin terminal invokes the default version of PHP. However, you get to choose which version of PHP is used within Virtualmin’s virtual server (or even a version of PHP on a per directory basis) so you need to be clear about which version of PHP is being invoked - obviously the extensions available to you will vary accordingly.