By default, if we install PHP on Ubuntu 24.04, it will automatically choose PHP 8.3.x. But, how if we want…