From e9eb80e26b5141bb35fa946b3ec325db5666b7ed Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 10 Jun 2025 12:15:00 +0100 Subject: [PATCH 01/20] First stab at a prototype for revamping the download instructions page --- downloads-get-instructions.php | 97 +++++++++++++++++++++++++++ downloads.php | 116 ++++++++++++++++++++------------- include/header.inc | 19 ++++++ include/version.inc | 52 +++++++++++++++ js/version-choice.js | 60 +++++++++++++++++ 5 files changed, 299 insertions(+), 45 deletions(-) create mode 100644 downloads-get-instructions.php create mode 100644 js/version-choice.js diff --git a/downloads-get-instructions.php b/downloads-get-instructions.php new file mode 100644 index 0000000000..768600cee4 --- /dev/null +++ b/downloads-get-instructions.php @@ -0,0 +1,97 @@ + '@8.4', + 'php83' => '@8.3', + 'php82' => '@8.2', + 'php81' => '@8.1', + default => '' + }; + + $versionDir = match($_GET['version']) { + 'php84' => '8.4', + 'php83' => '8.3', + 'php82' => '8.2', + 'php81' => '8.1', + default => '8.4' + }; + + echo << + On the OSX command line shell, enter: +

+
+brew install php{$version}
+
+

+To enable PHP in Apache add the following to httpd.conf and restart Apache: +

+
+LoadModule php_module \$HOMEBREW_PREFIX/opt/php/lib/httpd/modules/libphp.so
+
+<FilesMatch \.php$>
+SetHandler application/x-httpd-php
+</FilesMatch>
+
+

+Finally, check DirectoryIndex includes index.php +

+
+DirectoryIndex index.php index.html
+
+

+The php.ini and php-fpm.ini file can be found in: +

+
+\$HOMEBREW_PREFIX/etc/php/{$versionDir}/
+
+

+ENDOSX; + return; +} +?> + + On the command line shell, enter: +

+
+sudo apt-get update
+sudo apt-get install php
+
+ENDAPT; + } else { + $version = match($_GET['version']) { + 'php84' => '8.4', + 'php83' => '8.3', + 'php82' => '8.2', + 'php81' => '8.1', + default => '8.4' + }; + echo << + On the command line shell, enter: +

+
+sudo apt -y install software-properties-common
+sudo add-apt-repository ppa:ondrej/php
+sudo apt update
+sudo apt install php{$version}
+
+ENDAPT; + } + return; +} +?> +

+There are no instructions yet. +

+ + diff --git a/downloads.php b/downloads.php index 5468da840f..ad5a1a118e 100644 --- a/downloads.php +++ b/downloads.php @@ -7,8 +7,6 @@ // Try to make this page non-cached header_nocache(); -$SHOW_COUNT = 4; - $SIDEBAR_DATA = '
Supported Versions @@ -37,15 +35,85 @@ ], ], "current" => "downloads", + "js_files" => [ + "/js/version-choice.js", + ], ], ); + +function option(string $id, string $value, string $desc) +{ + $selected = ''; + if (array_key_exists($id, $_GET) && $_GET[$id] === $value) { + $selected = ' selected'; + } + + echo <<{$desc} + +ENDOPT; +} ?>

Downloads & Installation Instructions

+
+Get PHP for + + + + +to work on + + +with + + + + +
+ +I want to have multiple versions at the same time: + + +
+ +

Instructions

+
+ +
+ +

Binaries

@@ -66,49 +134,7 @@

Source Code

- $major_releases): /* major releases loop start */ - $releases = array_slice($major_releases, 0, $SHOW_COUNT); -?> - - $a): ?> - - - -

- - PHP - (Changelog) -

-
- -
    - -
  • - - - ', $rel['md5'], ''; - if (isset($rel['sha256'])) echo '', $rel['sha256'], ''; - ?> - -

    - Note: - -

    - -
  • - -
  • - - Windows downloads - -
  • -
- - GPG Keys for PHP -
- - +

GPG Keys

diff --git a/include/header.inc b/include/header.inc index c31b73ebad..0bba3409f0 100644 --- a/include/header.inc +++ b/include/header.inc @@ -23,6 +23,13 @@ foreach($css_files as $filename) { $CSS[$filename] = @filemtime($path); } +if (isset($config["js_files"])) { + foreach($config['js_files'] as $filename) { + $path = dirname(__DIR__) . $filename; + $JS[$filename] = @filemtime($path); + } +} + if (isset($shortname) && $shortname) { header("Link: <$shorturl>; rel=shorturl"); } @@ -89,6 +96,18 @@ if (!isset($config["languages"])) { " hreflang=""> + $modified): ?> + + + + $modified): ?> + + + + + "> + + diff --git a/include/version.inc b/include/version.inc index 82a5084dc3..d5a400626e 100644 --- a/include/version.inc +++ b/include/version.inc @@ -107,3 +107,55 @@ function release_get_latest() { 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): ?> + + + +

+ + PHP + (Changelog) +

+
+ +
    + +
  • + + + ', $rel['md5'], ''; + if (isset($rel['sha256'])) echo '', $rel['sha256'], ''; + ?> + +

    + Note: + +

    + +
  • + +
  • + + Windows downloads + +
  • +
+ + GPG Keys for PHP +
+ + + { + if (response.ok) { + return response.text() + } else { + throw new Error("Couldn't fetch instructions"); + } + }) + .then(data => { + instructionsDiv.innerHTML = data + }) + .catch(error => console.error("Couldn't fetch instructions: ", error)); +} + +function setSelectOsBoxes() { + let osSelector = document.getElementById("os") + let variantSelector = document.getElementById("osvariant") + + for (var i = variantSelector.length - 1; i >= 0; i--) { + if (!variantSelector.options[i].value.startsWith(osSelector.options[osSelector.selectedIndex].value + "-")) { + variantSelector.options[i].disabled = true + } else { + variantSelector.options[i].disabled = false + variantSelector.selectedIndex = i + } + } + + setSelectBoxes(); +} + +window.onload = function() { + let osSelector = document.getElementById("os") + let variantSelector = document.getElementById("osvariant") + let usageSelector = document.getElementById("usage") + let versionSelector = document.getElementById("version") + let multiversionBox = document.getElementById("multiversion") + + osSelector.addEventListener("change", setSelectOsBoxes) + variantSelector.addEventListener("change", setSelectBoxes) + usageSelector.addEventListener("change", setSelectBoxes) + versionSelector.addEventListener("change", setSelectBoxes) + multiversionBox.addEventListener("change", setSelectBoxes) + + setSelectOsBoxes() +} From 8892505f84e35ffa1058b91ec095e9b8247d30f0 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Thu, 3 Jul 2025 12:12:36 +0300 Subject: [PATCH 02/20] Update layout --- downloads-get-instructions.php | 24 ++++---- downloads.php | 109 +++++++++++++++++---------------- styles/theme-base.css | 35 +++++++++++ 3 files changed, 103 insertions(+), 65 deletions(-) diff --git a/downloads-get-instructions.php b/downloads-get-instructions.php index 768600cee4..ac232001ed 100644 --- a/downloads-get-instructions.php +++ b/downloads-get-instructions.php @@ -25,31 +25,31 @@

On the OSX command line shell, enter:

-
+
 brew install php{$version}
-
+

To enable PHP in Apache add the following to httpd.conf and restart Apache:

-
+
 LoadModule php_module \$HOMEBREW_PREFIX/opt/php/lib/httpd/modules/libphp.so
 
 <FilesMatch \.php$>
 SetHandler application/x-httpd-php
 </FilesMatch>
-
+

Finally, check DirectoryIndex includes index.php

-
+
 DirectoryIndex index.php index.html
-
+

The php.ini and php-fpm.ini file can be found in:

-
+
 \$HOMEBREW_PREFIX/etc/php/{$versionDir}/
-
+

ENDOSX; return; @@ -62,10 +62,10 @@

On the command line shell, enter:

-
+
 sudo apt-get update
 sudo apt-get install php
-
+
ENDAPT; } else { $version = match($_GET['version']) { @@ -79,12 +79,12 @@

On the command line shell, enter:

-
+
 sudo apt -y install software-properties-common
 sudo add-apt-repository ppa:ondrej/php
 sudo apt update
 sudo apt install php{$version}
-
+
ENDAPT; } return; diff --git a/downloads.php b/downloads.php index ad5a1a118e..241644b9e6 100644 --- a/downloads.php +++ b/downloads.php @@ -56,65 +56,68 @@ function option(string $id, string $value, string $desc) ?>

Downloads & Installation Instructions

-
-Get PHP for - - - - -to work on - - -with - - - - -
- -I want to have multiple versions at the same time: - - + +
+ I want to use PHP for + . +
+ +
+ I work with + + , + and use + +
+ + + + + +
+ +

Instructions

-
+
- -

Binaries

diff --git a/styles/theme-base.css b/styles/theme-base.css index c28b2a1385..96fdf06fa0 100644 --- a/styles/theme-base.css +++ b/styles/theme-base.css @@ -508,6 +508,41 @@ div.classsynopsisinfo_comment { margin-top:1.5rem; } +.phpcode { + background-color: #FFF; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); + border-radius: 0 0 2px 2px; + overflow-x: auto; + display: flex; + align-items: center; + width: 100%; + height: 100%; + padding: 0 1.5rem; + box-sizing: border-box; + margin: 0; +} + +.instructions { + margin-bottom: 2rem; +} + +.instructions p { + margin: 1rem 0; +} + +.instructions-form { + display: flex; + flex-direction: column; + gap: .75rem; + margin-bottom: 2rem; +} + +.instructions-label { + display: flex; + align-items: center; + gap: 8px; +} + .warn { padding: .75rem 1rem; margin: 1.5rem 0 1.5rem 1.5rem; From 58500599d8d2000efd3220c2a013faf8906ac635 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Thu, 3 Jul 2025 12:36:45 +0300 Subject: [PATCH 03/20] Should work with disabled js --- downloads-get-instructions.php | 22 +++--- downloads.php | 126 ++++++++++++++++++++++----------- js/version-choice.js | 60 ---------------- 3 files changed, 96 insertions(+), 112 deletions(-) delete mode 100644 js/version-choice.js diff --git a/downloads-get-instructions.php b/downloads-get-instructions.php index ac232001ed..e8149d3196 100644 --- a/downloads-get-instructions.php +++ b/downloads-get-instructions.php @@ -1,11 +1,11 @@ '@8.4', 'php83' => '@8.3', 'php82' => '@8.2', @@ -13,7 +13,7 @@ default => '' }; - $versionDir = match($_GET['version']) { + $versionDir = match($options['version']) { 'php84' => '8.4', 'php83' => '8.3', 'php82' => '8.2', @@ -56,8 +56,8 @@ } ?> On the command line shell, enter: @@ -68,7 +68,7 @@

ENDAPT; } else { - $version = match($_GET['version']) { + $version = match($options['version']) { 'php84' => '8.4', 'php83' => '8.3', 'php82' => '8.2', @@ -94,4 +94,4 @@ There are no instructions yet.

- + diff --git a/downloads.php b/downloads.php index 241644b9e6..6b8d3f46e8 100644 --- a/downloads.php +++ b/downloads.php @@ -35,82 +35,116 @@ ], ], "current" => "downloads", - "js_files" => [ - "/js/version-choice.js", - ], ], ); -function option(string $id, string $value, string $desc) +function option(string $value, string $desc, $attributes = []): string { - $selected = ''; - if (array_key_exists($id, $_GET) && $_GET[$id] === $value) { - $selected = ' selected'; - } + return ''; +} - echo <<{$desc} +$usage = [ + 'web' => 'Web Development', + 'cli' => 'Command Line Libraries', + 'fw-drupal' => 'Drupal', + 'fw-laravel' => 'Laravel', + 'fw-symfony' => 'Symfony', +]; + +$os = [ + 'linux' => [ + 'name' => 'Linux', + 'variants' => [ + 'linux-deb-buster' => 'Debian Buster', + 'linux-deb-bullseye' => 'Debian Bullseye', + 'linux-deb-bookworm' => 'Debian Bookworm', + 'linux-rpm-fedora41' => 'Fedora 41', + 'linux-rpm-fedora42' => 'Fedora 42', + 'linux-rpm-redhat' => 'RedHat', + ], + ], + 'osx' => [ + 'name' => 'macOS', + 'variants' => [ + 'osx-latest' => 'macOS Latest', + ], + ], + 'windows' => [ + 'name' => 'Windows', + 'variants' => [ + 'windows-wsl' => 'Windows with WSL', + 'windows-normal' => 'Windows without WSL', + ], + ], +]; + +$defaults = [ + 'os' => 'linux', + 'version' => 'php84', + 'usage' => 'web', +]; -ENDOPT; +$options = array_merge($defaults, $_GET); +if (!array_key_exists('osvariant', $options) || !array_key_exists($options['osvariant'], $os[$options['os']]['variants'])) { + $options['osvariant'] = array_key_first($os[$options['os']]['variants']); } ?>

Downloads & Installation Instructions

-
+
I want to use PHP for .
I work with - , + + + + , and use
-
- -
+

Instructions

@@ -156,5 +190,15 @@ function option(string $id, string $value, string $desc)

+ + $SIDEBAR_DATA]); diff --git a/js/version-choice.js b/js/version-choice.js deleted file mode 100644 index 142a4065b4..0000000000 --- a/js/version-choice.js +++ /dev/null @@ -1,60 +0,0 @@ -function setSelectBoxes() { - let instructionsDiv = document.getElementById("instructions") - let osSelector = document.getElementById("os") - let variantSelector = document.getElementById("osvariant") - let usageSelector = document.getElementById("usage") - let versionSelector = document.getElementById("version") - let multiversionBox = document.getElementById("multiversion") - - const url = '/downloads-get-instructions.php' + - '?os=' + osSelector.options[osSelector.selectedIndex].value + - '&osvariant=' + variantSelector.options[variantSelector.selectedIndex].value + - '&usage=' + usageSelector.options[usageSelector.selectedIndex].value + - '&version=' + versionSelector.options[versionSelector.selectedIndex].value + - '&multiversion=' + multiversionBox.checked - - fetch(url) - .then(response => { - if (response.ok) { - return response.text() - } else { - throw new Error("Couldn't fetch instructions"); - } - }) - .then(data => { - instructionsDiv.innerHTML = data - }) - .catch(error => console.error("Couldn't fetch instructions: ", error)); -} - -function setSelectOsBoxes() { - let osSelector = document.getElementById("os") - let variantSelector = document.getElementById("osvariant") - - for (var i = variantSelector.length - 1; i >= 0; i--) { - if (!variantSelector.options[i].value.startsWith(osSelector.options[osSelector.selectedIndex].value + "-")) { - variantSelector.options[i].disabled = true - } else { - variantSelector.options[i].disabled = false - variantSelector.selectedIndex = i - } - } - - setSelectBoxes(); -} - -window.onload = function() { - let osSelector = document.getElementById("os") - let variantSelector = document.getElementById("osvariant") - let usageSelector = document.getElementById("usage") - let versionSelector = document.getElementById("version") - let multiversionBox = document.getElementById("multiversion") - - osSelector.addEventListener("change", setSelectOsBoxes) - variantSelector.addEventListener("change", setSelectBoxes) - usageSelector.addEventListener("change", setSelectBoxes) - versionSelector.addEventListener("change", setSelectBoxes) - multiversionBox.addEventListener("change", setSelectBoxes) - - setSelectOsBoxes() -} From f64952f100d71675258b092d42face1261545ff2 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Thu, 3 Jul 2025 14:31:44 +0300 Subject: [PATCH 04/20] Fix selection for usage --- downloads.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/downloads.php b/downloads.php index 6b8d3f46e8..99d2a0cf09 100644 --- a/downloads.php +++ b/downloads.php @@ -96,7 +96,9 @@ function option(string $value, string $desc, $attributes = []): string I want to use PHP for .
From a5ba1a991edb7e2958900f771d64af7ac8772a51 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Thu, 3 Jul 2025 14:35:13 +0300 Subject: [PATCH 05/20] nits --- downloads.php | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/downloads.php b/downloads.php index 99d2a0cf09..7c966724fc 100644 --- a/downloads.php +++ b/downloads.php @@ -45,10 +45,11 @@ function option(string $value, string $desc, $attributes = []): string $usage = [ 'web' => 'Web Development', - 'cli' => 'Command Line Libraries', - 'fw-drupal' => 'Drupal', - 'fw-laravel' => 'Laravel', - 'fw-symfony' => 'Symfony', + 'cli' => 'CLI/Library Development', + 'fw-drupal' => 'Drupal Development', + 'fw-laravel' => 'Laravel Development', + 'fw-symfony' => 'Symfony Development', + 'fw-wordpress' => 'WordPress Development', ]; $os = [ @@ -78,6 +79,14 @@ function option(string $value, string $desc, $attributes = []): string ], ]; +$versions = [ + 'php84' => 'version 8.4', + 'php83' => 'version 8.3', + 'php82' => 'version 8.2', + 'php81' => 'version 8.1', + 'default' => 'OS default version', +]; + $defaults = [ 'os' => 'linux', 'version' => 'php84', @@ -124,11 +133,11 @@ function option(string $value, string $desc, $attributes = []): string , and use From 42132e719e0dcfb6715d6fd58f5c7e9ef9b6f708 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 21 Jul 2025 15:12:58 +0100 Subject: [PATCH 06/20] Silence warning if there are no JS files --- include/header.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/include/header.inc b/include/header.inc index 0bba3409f0..b339b625d9 100644 --- a/include/header.inc +++ b/include/header.inc @@ -23,6 +23,7 @@ foreach($css_files as $filename) { $CSS[$filename] = @filemtime($path); } +$JS = []; if (isset($config["js_files"])) { foreach($config['js_files'] as $filename) { $path = dirname(__DIR__) . $filename; From 1d89ee9e18c081cbd7b7084b3ef1a839bad8335b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 21 Jul 2025 16:19:18 +0100 Subject: [PATCH 07/20] Re-do logic according to Shivam's instructions, and add instructions to repo --- downloads-get-instructions.php | 133 +++++++----------- downloads.php | 71 +++++----- include/download-instructions/fw-drupal.php | 6 + include/download-instructions/fw-laravel.php | 6 + include/download-instructions/fw-symfony.php | 6 + .../download-instructions/fw-wordpress.php | 6 + .../linux-debian-cli-community.php | 12 ++ .../linux-debian-cli-default.php | 7 + .../linux-debian-web-community.php | 1 + .../linux-debian-web-default.php | 1 + .../linux-fedora-cli-community.php | 10 ++ .../linux-fedora-cli-default.php | 6 + .../linux-fedora-web-community.php | 1 + .../linux-fedora-web-default.php | 1 + .../linux-ubuntu-cli-community.php | 10 ++ .../linux-ubuntu-cli-default.php | 7 + .../linux-ubuntu-web-community.php | 1 + .../linux-ubuntu-web-default.php | 1 + .../osx-homebrew-php.php | 9 ++ .../download-instructions/osx-homebrew.php | 8 ++ .../download-instructions/osx-macports.php | 6 + .../windows-chocolatey.php | 6 + .../download-instructions/windows-native.php | 6 + .../download-instructions/windows-scoop.php | 6 + 24 files changed, 210 insertions(+), 117 deletions(-) create mode 100644 include/download-instructions/fw-drupal.php create mode 100644 include/download-instructions/fw-laravel.php create mode 100644 include/download-instructions/fw-symfony.php create mode 100644 include/download-instructions/fw-wordpress.php create mode 100644 include/download-instructions/linux-debian-cli-community.php create mode 100644 include/download-instructions/linux-debian-cli-default.php create mode 120000 include/download-instructions/linux-debian-web-community.php create mode 120000 include/download-instructions/linux-debian-web-default.php create mode 100644 include/download-instructions/linux-fedora-cli-community.php create mode 100644 include/download-instructions/linux-fedora-cli-default.php create mode 120000 include/download-instructions/linux-fedora-web-community.php create mode 120000 include/download-instructions/linux-fedora-web-default.php create mode 100644 include/download-instructions/linux-ubuntu-cli-community.php create mode 100644 include/download-instructions/linux-ubuntu-cli-default.php create mode 120000 include/download-instructions/linux-ubuntu-web-community.php create mode 120000 include/download-instructions/linux-ubuntu-web-default.php create mode 100644 include/download-instructions/osx-homebrew-php.php create mode 100644 include/download-instructions/osx-homebrew.php create mode 100644 include/download-instructions/osx-macports.php create mode 100644 include/download-instructions/windows-chocolatey.php create mode 100644 include/download-instructions/windows-native.php create mode 100644 include/download-instructions/windows-scoop.php diff --git a/downloads-get-instructions.php b/downloads-get-instructions.php index e8149d3196..67c663373c 100644 --- a/downloads-get-instructions.php +++ b/downloads-get-instructions.php @@ -1,97 +1,60 @@ '@8.4', - 'php83' => '@8.3', - 'php82' => '@8.2', - 'php81' => '@8.1', - default => '' - }; + if ($options['version'] === 'default') { + $options['version'] = $latestPhpVersion; + } +} - $versionDir = match($options['version']) { - 'php84' => '8.4', - 'php83' => '8.3', - 'php82' => '8.2', - 'php81' => '8.1', - default => '8.4' - }; +if (in_array($options['usage'], ['fw-drupal', 'fw-laravel', 'fw-symfony', 'fw-wordpress'])) { + $file = "{$options['usage']}"; + $options['os'] = null; +} - echo << - On the OSX command line shell, enter: -

-
-brew install php{$version}
-
-

-To enable PHP in Apache add the following to httpd.conf and restart Apache: -

-
-LoadModule php_module \$HOMEBREW_PREFIX/opt/php/lib/httpd/modules/libphp.so
+$multiversion = false;
 
-<FilesMatch \.php$>
-SetHandler application/x-httpd-php
-</FilesMatch>
-
-

-Finally, check DirectoryIndex includes index.php -

-
-DirectoryIndex index.php index.html
-
-

-The php.ini and php-fpm.ini file can be found in: -

-
-\$HOMEBREW_PREFIX/etc/php/{$versionDir}/
-
-

-ENDOSX; - return; +if (array_key_exists('multiversion', $options)) { + $multiversion = $options['multiversion'] === 'Y'; } + +switch ($options['os']) { + case 'linux': + $defaultOrCommunity = ($options['version'] !== 'default' || $multiversion) ? 'community' : 'default'; + if ($defaultOrCommunity === 'community' && $options['version'] == 'default') { + $options['version'] = $latestPhpVersion; + } + $file = "{$options['osvariant']}-{$options['usage']}-{$defaultOrCommunity}"; + break; + case 'osx': + case 'windows': + $file = "{$options['osvariant']}"; + break; +} + +$version = $options['version']; +$versionNoDot = str_replace('.', '', $version); + +if (file_exists(__DIR__ . "/include/download-instructions/{$file}.php")) { + include __DIR__ . "/include/download-instructions/{$file}.php"; + return true; +} else { ?> - - On the command line shell, enter: +There are no instructions yet. Try using the generic installation from source.

-
-sudo apt-get update
-sudo apt-get install php
-
-ENDAPT; - } else { - $version = match($options['version']) { - 'php84' => '8.4', - 'php83' => '8.3', - 'php82' => '8.2', - 'php81' => '8.1', - default => '8.4' - }; - echo << - On the command line shell, enter: -

-
-sudo apt -y install software-properties-common
-sudo add-apt-repository ppa:ondrej/php
-sudo apt update
-sudo apt install php{$version}
-
-ENDAPT; - } - return; + -

-There are no instructions yet. -

- - diff --git a/downloads.php b/downloads.php index 7c966724fc..d6b13e2147 100644 --- a/downloads.php +++ b/downloads.php @@ -56,40 +56,43 @@ function option(string $value, string $desc, $attributes = []): string 'linux' => [ 'name' => 'Linux', 'variants' => [ - 'linux-deb-buster' => 'Debian Buster', - 'linux-deb-bullseye' => 'Debian Bullseye', - 'linux-deb-bookworm' => 'Debian Bookworm', - 'linux-rpm-fedora41' => 'Fedora 41', - 'linux-rpm-fedora42' => 'Fedora 42', - 'linux-rpm-redhat' => 'RedHat', + 'linux-debian' => 'Debian', + 'linux-fedora' => 'Fedora', + 'linux-redhat' => 'RedHat', + 'linux-ubuntu' => 'Ubuntu', ], ], 'osx' => [ 'name' => 'macOS', 'variants' => [ - 'osx-latest' => 'macOS Latest', + 'osx-homebrew' => 'Homebrew/Brew', + 'osx-homebrew-php' => 'Homebrew/Homebrew-PHP', + 'osx-macports' => 'MacPorts', ], ], 'windows' => [ 'name' => 'Windows', 'variants' => [ - 'windows-wsl' => 'Windows with WSL', - 'windows-normal' => 'Windows without WSL', + 'windows-native' => 'Windows Native Build', + 'windows-chocolatey' => 'Windows with Chocolatey', + 'windows-scoop' => 'Windows with Scoop', + 'windows-wsl-debian' => 'Windows with WSL/Debian', + 'windows-wsl-ubuntu' => 'Windows with WSL/Ubuntu', ], ], ]; $versions = [ - 'php84' => 'version 8.4', - 'php83' => 'version 8.3', - 'php82' => 'version 8.2', - 'php81' => 'version 8.1', + '8.4' => 'version 8.4', + '8.3' => 'version 8.3', + '8.2' => 'version 8.2', + '8.1' => 'version 8.1', 'default' => 'OS default version', ]; $defaults = [ 'os' => 'linux', - 'version' => 'php84', + 'version' => 'default', 'usage' => 'web', ]; @@ -160,26 +163,10 @@ function option(string $value, string $desc, $attributes = []): string

Instructions

- +
-

Binaries

- -

- Binaries are available for - Microsoft Windows. The PHP project does not currently release binary packages - for other platforms such as Linux or macOS, but they are packaged by distributions - and other providers. For more information, see: - -

-

+

Source Code

@@ -201,6 +188,26 @@ function option(string $value, string $desc, $attributes = []): string

+

Binaries

+ +

+ Binaries are available for + Microsoft Windows. The PHP project does not currently release binary packages + for other platforms such as Linux or macOS, but they are packaged by distributions + and other providers. For more information, see: + +

+

+ + +