Debian

At the time of writing, Debian 10.3 was the current version of this DEB-based Linux distribution. It ships with PHP 7.3 by default.

The package repository maintained by Ondřej Surý is commonly used for installing newer PHP versions on Debian. Here is how you can add this repository to your package manager configuration and upgrade to PHP 7.4:

$ sudo apt-get install apt-transport-https \
                       lsb-release \
                       ca-certificates \
                       wget

$ wget -O \
       /etc/apt/trusted.gpg.d/php.gpg \
       https://packages.sury.org/php/apt.gpg

$ echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | \
       sudo tee /etc/apt/sources.list.d/php.list

$ sudo apt-get update

$ sudo apt-get upgrade