TIDE
Languages

PHP

Installing modern PHP (8.2 / 8.3) on Ubuntu in TIDE using Ondrej Surý PPA

PHP

PHP is a widely-used open-source general-purpose scripting language that is especially suited for web development and backend server architectures.

Installation

Step 1: Add Ondřej Surý PHP PPA

The standard Ubuntu repositories may lag behind PHP releases. The Ondřej Surý PPA provides the latest stable PHP releases (8.2, 8.3, etc.).

sudo apt update
sudo apt install -y software-properties-common ca-certificates lsb-release apt-transport-https
sudo add-apt-repository -y ppa:ondrej/php
sudo apt update

Step 2: Install PHP 8.3 and Common Extensions

sudo apt install -y php8.3-cli php8.3-common php8.3-curl php8.3-mbstring php8.3-xml php8.3-zip

Step 3: Install Composer (Package Manager)

Composer is the standard dependency manager for PHP:

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer

Verification

Check the installed PHP version and Composer:

php -v
composer --version

Running Code

Create a file named hello.php:

<?php
echo "Hello, TIDE!\n";

Execute the script:

php hello.php

Official Resources

On this page