In CyberPanel, the default path to the PHP 8.0 binary is /usr/local/lsws/lsphp80/bin/php. You can use this path in the exec function to execute a command using PHP 8.0.
For example:
$output = exec('/usr/local/lsws/lsphp80/bin/php command');
Keep in mind that the user running the PHP script must have permission to execute the PHP binary at this path. If you are unable to execute the PHP binary due to permissions issues, you may need to adjust the permissions on the PHP binary or the parent directories.
It’s also worth noting that CyberPanel allows you to choose which version of PHP to use for each domain. If you want to use a different version of PHP for a particular domain, you can change the PHP version in the CyberPanel control panel for that domain.