This tutorial shows you how to compile PHP7.0/PHP7.1 on Arch Linux and install it alongside PHP7.2. Arch Linux is a rolling-release distribution with the newest and greatest software. PHP7.2 landed in Arch Linux repository. Some web applications such as WordPress works well with PHP7.2, but others like NextCloud currently doesn’t support PHP7.2. The upcoming NextCloud version — NextCloud 13 — is said to be compatible with PHP7.2.
Read full tutorial here: https://www.linuxbabe.com/arch/compile-php7-0-php7-1-from-source-arch-linux