This guide explains how to install PHP on Ubuntu using the Ondřej PPA
repository and the necessary PHP modules.
ondrej/php
repository sudo add-apt-repository ppa:ondrej/php
sudo apt update && sudo apt upgrade
sudo apt install php8.3-common php8.3-cli php8.3-fpm php8.3-{curl,bz2,mbstring,intl}
php -v
PHP 8.3.9 (cli) (built: Jul 5 2024 12:03:23) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.9, Copyright (c) Zend Technologies
with Zend OPcache v8.3.9, Copyright (c), by Zend Technologies