Rocky Linux 8, as a RHEL 8 clone, provides PHP through modular streams in AppStream, where PHP 7.2 is the default but streams up to 7.4 receive support until the distro's end-of-life in 2029.howtoforge+2
Newer versions like PHP 8.x require third-party repositories such as Remi for installation on Rocky 8.computingforgeeks+1
Run dnf module list php to view available streams on your Rocky 8 system.server-world+1
Default stream shows as PHP 7.2 [d].
Supported streams include 7.3 and 7.4.
Verify with php -v
dnf module enable php:7.4, as upstream PHP 7.4 reached general end-of-life (EOL) in November 2022.tecmint+1Red Hat (and thus Rocky Linux) continues backporting critical security fixes to the PHP 7.4 AppStream module until Rocky 8's full EOL in May 2029, making it safe for production use despite the upstream EOL notice.rockylinux+2