array( * "release" => array( * "source/windows" => array( * "filename" => "filename.tar.bz2", * "name" => "package name", * "sha256" => "shasum -256", * "date" => "this files release date", * "note" => "this file was updated 29feb due to broken phar files..", * ), * "announcement" => "bool, release announcement exists in releases/?", * ), * ), * ); */ $RELEASES = (function () { $data = []; /* PHP 8.4 Release */ $data['8.4'] = [ 'version' => '8.4.12', 'date' => '28 Aug 2025', 'tags' => [''], // Set to ['security'] for security releases. 'sha256' => [ 'tar.gz' => '4963b0d3a6ca8a391317d1b80309c2cfdebf4318b131ff8e7d19e3ab79da9104', 'tar.bz2' => '2ebd5382eb090d603087da649ed21de64b079616bc9a02abbc532b89b17e3468', 'tar.xz' => 'c1b7978cbb5054eed6c749bde4444afc16a3f2268101fb70a7d5d9b1083b12ad', ] ]; /* PHP 8.3 Release */ $data['8.3'] = [ 'version' => '8.3.25', 'date' => '28 Aug 2025', 'tags' => [], // Set to ['security'] for security releases. 'sha256' => [ 'tar.gz' => '86711e98eccffb637dc319f0cdcde9188c1710633910beb1a3cbb3ae5ecc2e05', 'tar.bz2' => '06e54791e11192f089e4d20c716f25bddcebdde951b570b555edfb5988a8b71a', 'tar.xz' => '187b61bb795015adacf53f8c55b44414a63777ec19a776b75fb88614506c0d37', ] ]; /* PHP 8.2 Release */ $data['8.2'] = [ 'version' => '8.2.29', 'date' => '3 Jul 2025', 'tags' => ['security'], // Set to ['security'] for security releases. 'sha256' => [ 'tar.gz' => '0b27d330769d4bc67b1d8864347c38744b289664a946919c3ddb2235d326b3cd', 'tar.bz2' => '51979e8d198cbade2aad4ffe9f53dd3f04f9602d3089e5979985e058ade4267c', 'tar.xz' => '475f991afd2d5b901fb410be407d929bc00c46285d3f439a02c59e8b6fe3589c', ] ]; /* PHP 8.1 Release */ $data['8.1'] = [ 'version' => '8.1.33', 'date' => '3 Jul 2025', 'tags' => ['security'], // Set to ['security'] for security releases. 'sha256' => [ 'tar.gz' => 'ee33568a0e2be0b722b3f9a88cecc578316b66b25c90cd0a4f3b1a5cdc3cd826', 'tar.bz2' => 'b6553451841c1a569865d7fdc83024621ee4434cd8fbfeb0a31588ac9c70685f', 'tar.xz' => '9db83bf4590375562bc1a10b353cccbcf9fcfc56c58b7c8fb814e6865bb928d1', ] ]; $ret = []; foreach ($data as $release) { $version = $release['version']; [$major] = explode('.', $version, 2); $info = [ 'announcement' => $release['announcement'] ?? true, 'tags' => $release['tags'], 'date' => $release['date'], 'source' => [], ]; foreach ($release['sha256'] as $format => $hash) { $info['source'][] = [ 'filename' => "php-{$version}.{$format}", 'name' => "PHP {$version} ({$format})", 'sha256' => $hash, 'date' => $release['date'], ]; } $ret[$major][$version] = $info; } return $ret; })(); // Get latest release version and info. function release_get_latest() { global $RELEASES; $version = '0.0.0'; $current = null; foreach ($RELEASES as $versions) { foreach ($versions as $ver => $info) { if (version_compare($ver, $version) > 0) { $version = $ver; $current = $info; } } } return [$version, $current]; } function show_source_releases() { global $RELEASES; $SHOW_COUNT = 4; $i = 0; foreach ($RELEASES as $MAJOR => $major_releases): /* major releases loop start */ $releases = array_slice($major_releases, 0, $SHOW_COUNT); ?> $a): ?>
Note: