PHP 8 was released on November 26, 2020 and is ready for download and use in your Applications development journey. PHP 8.0 is a major update of the PHP language with many new features, optimizations which includes named arguments, union types, attributes, constructor property promotion, match expression, nullsafe operator, JIT, and improvements in the type system, error handling, and consistency.
Since this is a major release there are lots of deprecations and application written in an older PHP version may break. Read release changes before upgrading and perform thorough testing in a Development environment before you think about production. In this article we will install PHP 8 on Arch Linux and Manjaro Linux distribution.
Install PHP 8.0 on Arch Linux | Manjaro
PHP is a widely adopted scripting language suited for Web development and can be embedded into HTML. PHP packages are available in Arch repositories with the older versions and more recent available in AUR.
Install AUR Helper
Install vim or nano package for editing files.
sudo pacman -S vim nano --noconfirm
We’ll install yay AUR helper.
sudo pacman -S --needed --noconfirm git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
Confirm installation by checking yay version.
$ yay --version
yay v10.1.1 - libalpm v12.0.2
Install PHP 8.0 on Arch Linux | Manjaro
Once yay has been installed use it to download the latest PHP 8.0 on Arch Linux | Manjaro:
$ yay -S php80
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] php80-zts-8.0.0-1
1 php80-zts (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> N
:: PKGBUILD up to date, Skipping (1/1): php80-zts
1 php80-zts (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> N
:: (1/1) Parsing SRCINFO: php80-zts
If you don’t want any prompts run the following command:
$ yay -S php80 --noconfirm
Installation should start without prompting you for choices.
...
[Aur:1] php80-zts-8.0.0-1
1 php80-zts (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: PKGBUILD up to date, Skipping (1/1): php80-zts
1 php80-zts (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: php80-zts
:: PGP keys need importing:
-> F38252826ACD957EF380D39F2F7956BC5DA04B5D, required by: php80-zts
-> CBAF69F173A0FEA4B537F470D66C9593118BCCB6, required by: php80-zts
-> 1729F83938DA44E27BA0F4D3DBDB397470D12172, required by: php80-zts
:: Importing keys with gpg...
...
Install PHP 8 extensions on Arch Linux | Manjaro
To install PHP 8 extensions use the following command syntax:
$ yay -S php80-<extension>
Example:
$ yay -S php80-zts-fpm php80-zts-gd php80-redis
You can now begin developments on Arch Linux and Manjaro system with PHP 8.0.
Originally posted 2020-12-12 06:31:39.