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 updateStep 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-zipStep 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/composerVerification
Check the installed PHP version and Composer:
php -v
composer --versionRunning Code
Create a file named hello.php:
<?php
echo "Hello, TIDE!\n";Execute the script:
php hello.php