xref: /web-php/supported-versions.php (revision 7ec8d43c)
1<?php
2$_SERVER['BASE_PAGE'] = 'supported-versions.php';
3
4include_once __DIR__ . '/include/prepend.inc';
5include_once __DIR__ . '/include/branches.inc';
6
7site_header('Supported Versions', ['css' => ['supported-versions.css']]);
8
9// Version notes: if you need to make a note about a version having an unusual
10// support lifetime, add it under a heading with an anchor, and add the anchor
11// and branch names to the array below ('x.y' => '#anchor-name').
12$VERSION_NOTES = [
13];
14?>
15
16<h1>Supported Versions</h1>
17
18<p>
19	Each release branch of PHP is fully supported for two years from its initial
20	stable release. During this period, bugs and security issues that have been
21	reported are fixed and are released in regular point releases.
22</p>
23
24<p>
25	After this two year period of active support, each branch is then supported
26	for two additional years for critical security issues only. Releases during
27	this period are made on an as-needed basis: there may be multiple point
28	releases, or none, depending on the number of reports.
29</p>
30
31<p>
32	Once the four years of support are completed, the branch reaches its end of
33	life and is no longer supported. <a href="/eol.php">A table of end of life
34	branches is available.</a>
35</p>
36
37<h3>Currently Supported Versions</h3>
38
39<table class="standard">
40	<thead>
41		<tr>
42			<th>Branch</th>
43			<th colspan="2">Initial Release</th>
44			<th colspan="2">Active Support Until</th>
45			<th colspan="2">Security Support Until</th>
46		</tr>
47	</thead>
48	<tbody>
49		<?php foreach (get_active_branches(false) as $major => $releases): ?>
50			<?php ksort($releases) ?>
51			<?php foreach ($releases as $branch => $release): ?>
52				<?php
53                $state = get_branch_support_state($branch);
54                $initial = get_branch_release_date($branch);
55                $until = get_branch_bug_eol_date($branch);
56                $eol = get_branch_security_eol_date($branch);
57                $now = new DateTime('now');
58                ?>
59				<tr class="<?php echo $state ?>">
60					<td>
61						<a href="/downloads.php#v<?php echo htmlspecialchars($release['version']) ?>"><?php echo htmlspecialchars($branch) ?></a>
62						<?php if (isset($VERSION_NOTES[$branch])): ?>
63							<a class="version-notes" href="<?php echo htmlspecialchars($VERSION_NOTES[$branch]) ?>">*</a>
64						<?php endif ?>
65					</td>
66					<td><?php echo htmlspecialchars($initial->format('j M Y')) ?></td>
67					<td class="collapse-phone"><em><?php echo htmlspecialchars(format_interval($initial, $now)) ?></em></td>
68					<td><?php echo htmlspecialchars($until->format('j M Y')) ?></td>
69					<td class="collapse-phone"><em><?php echo htmlspecialchars(format_interval($until, $now)) ?></em></td>
70					<td><?php echo htmlspecialchars($eol->format('j M Y')) ?></td>
71					<td class="collapse-phone"><em><?php echo htmlspecialchars(format_interval($eol, $now)) ?></em></td>
72				</tr>
73			<?php endforeach ?>
74		<?php endforeach ?>
75	</tbody>
76</table>
77
78<p>
79	Or, visualised as a calendar:
80</p>
81
82<?php
83/* Chrome doesn't handle @font-face directives in SVG files included via <img>
84 * tags (which is odd, since it does handle them when you view the SVG files by
85 * themselves). Instead, we'll just pull the SVG into the page inline, thereby
86 * ensuring that we have the same text formatting as the rest of the page. */
87
88$non_standalone = true;
89include __DIR__ . '/images/supported-versions.php';
90?>
91
92<h4>Key</h4>
93
94<table class="standard">
95	<tr class="stable">
96		<td>Active support</td>
97		<td>
98			A release that is being actively supported. Reported bugs and security
99			issues are fixed and regular point releases are made.
100		</td>
101	</tr>
102	<tr class="security">
103		<td>Security fixes only</td>
104		<td>
105			A release that is supported for critical security issues only. Releases
106			are only made on an as-needed basis.
107		</td>
108	</tr>
109	<tr class="eol">
110		<td>End of life</td>
111		<td>
112			A release that is no longer supported. Users of this release should
113			upgrade as soon as possible, as they may be exposed to unpatched security
114			vulnerabilities.
115		</td>
116	</tr>
117</table>
118
119<?php site_footer(); ?>
120