$releases) { $supportedVersions[$major] = array_keys($releases); } if (isset($_GET["version"])) { $versionArray = version_array($_GET["version"]); $ver = $versionArray[0]; if (isset($RELEASES[$ver])) { $combinedReleases = array_replace_recursive($RELEASES, $OLDRELEASES); $max = (int) ($_GET['max'] ?? 1); if ($max == -1) { $max = PHP_INT_MAX; } $count = 0; foreach ($combinedReleases[$ver] as $version => $release) { if ($max <= $count) { break; } if (compare_version($versionArray, $version) == 0) { if (!isset($_GET['max'])) { $release['supported_versions'] = $supportedVersions[$ver] ?? []; } $machineReadable[$version] = $release; $count++; } } if (!isset($_GET['max']) && !empty($machineReadable)) { $version = key($machineReadable); $machineReadable = current($machineReadable); $machineReadable["version"] = $version; } } if (empty($machineReadable)) { $machineReadable = ["error" => "Unknown version"]; } } else { foreach ($RELEASES as $major => $release) { $version = key($release); $r = current($release); $r["version"] = $version; $r['supported_versions'] = $supportedVersions[$major] ?? []; $machineReadable[$major] = $r; } } if (isset($_GET["serialize"])) { header('Content-type: text/plain'); echo serialize($machineReadable); } elseif (isset($_GET["json"])) { header('Content-Type: application/json'); echo json_encode($machineReadable); } return; } // Human Readable. site_header("Releases", [ 'current' => 'downloads', 'css' => '/styles/releases.css', ]); echo "

Unsupported Historical Releases

\n\n"; echo "

We have collected all the official information and code available for past PHP releases. You can find more details on the current release on our downloads page. Please note that older releases are listed for archival purposes only, and they are no longer supported.

\n"; $active_majors = array_keys($RELEASES); $latest = max($active_majors); foreach ($OLDRELEASES as $major => $a) { echo ''; if (!in_array($major, $active_majors, false)) { echo "\n
\n"; echo "

Support for PHP $major has been discontinued "; echo "since " . current($a)['date'] . '.'; echo "Please consider upgrading to $latest.

\n"; } $i = 0; foreach ($a as $ver => $release) { $i++; mk_rel( $major, $ver, $release["date"], $release["announcement"] ?? false, $release["source"] ?? [], $release["windows"] ?? [], $release["museum"] ?? ($i >= 3), ); } } site_footer(['sidebar' => '
Supported Versions
Check the supported versions page for more information on the support lifetime of each version of PHP.
End of Life Dates

The most recent branches to reach end of life status are:

PHP 7 ChangeLog

PHP 5 ChangeLog

PHP 4 ChangeLog

PHP Museum
Want a PHP serialized list of the PHP releases?
Want a JSON list of the PHP releases?
', ]); function recentEOLBranchesHTML(): string { $eol = []; foreach (get_eol_branches() as $branches) { foreach ($branches as $branch => $detail) { $detail_date = $detail['date']; while (isset($eol[$detail_date])) $detail_date++; $eol[$detail_date] = sprintf('
  • %s: %s
  • ', $branch, date('j M Y', $detail_date)); } } krsort($eol); return implode('', array_slice($eol, 0, 2)); } /** * @param bool|array $announcement */ function mk_rel(int $major, string $ver, string $date, $announcement, array $source, array $windows, bool $museum): void { printf("\n

    %1\$s

    \n\n"; }