diff --git a/eol.php b/eol.php new file mode 100644 index 000000000..b3d0a5be3 --- /dev/null +++ b/eol.php @@ -0,0 +1,60 @@ + 'Has known remote code execution vulnerabilities.', +); + +site_header('Unsupported Branches'); +?> + +

Unsupported Branches

+ +

+ This page lists the end of life date for each unsupported branch of PHP. If + you are using these releases, you are strongly urged to upgrade to + a current version, as using older versions may + expose you to security vulnerabilities and bugs that have been fixed in + more recent versions of PHP. +

+ + + + + + + + + + + + $branches): ?> + $detail): ?> + + + + + + + + + + +
BranchDateLast ReleaseNotes
+ + + + day ago + + + + + + +
+ + diff --git a/include/branches.inc b/include/branches.inc new file mode 100644 index 000000000..e62e51bf3 --- /dev/null +++ b/include/branches.inc @@ -0,0 +1,47 @@ + 1) { + return "$parts[0].$parts[1]"; + } +} + +function get_eol_branches() { + $branches = array(); + + // Gather the last release on each branch into a convenient array. + foreach ($GLOBALS['OLDRELEASES'] as $major => $releases) { + foreach ($releases as $version => $release) { + if ($branch = version_number_to_branch($version)) { + if (!isset($branches[$major][$branch]) || version_compare($version, $branches[$major][$branch]['version'], 'gt')) { + $branches[$major][$branch] = array( + 'date' => strtotime($release['date']), + 'version' => $version, + ); + } + } + } + } + + /* Exclude releases from active branches, where active is defined as "in + * the $RELEASES array". */ + foreach ($GLOBALS['RELEASES'] as $major => $releases) { + foreach ($releases as $version => $release) { + if ($branch = version_number_to_branch($version)) { + if (isset($branches[$major][$branch])) { + unset($branches[$major][$branch]); + } + } + } + } + + krsort($branches); + foreach ($branches as $major => $branch) { + krsort($branch); + } + + return $branches; +}