[PHP-WEBMASTER] [web-php] master: Merge pull request #1562 from PHPWatch/downloads/winget

[email protected] (Shivam Mathur via GitHub)
Newsgroups php.webmaster
Message-ID <[email protected]>
Author: Shivam Mathur (shivammathur)
Committer: GitHub (web-flow)
Pusher: shivammathur
Date: 2025-10-27T22:23:08+05:30

Commit: https://github.com/php/web-php/commit/cea4d68112765aa7872e46374ee640dd500946c4
Raw diff: https://github.com/php/web-php/commit/cea4d68112765aa7872e46374ee640dd500946c4.diff

Merge pull request #1562 from PHPWatch/downloads/winget

Downloads: Add `winget` download instrunctions

Changed paths:
  A  include/download-instructions/windows-winget.php
  M  downloads.php


Diff:

diff --git a/downloads.php b/downloads.php
index 65993ce5f1..907095dce1 100644
--- a/downloads.php
+++ b/downloads.php
@@ -88,6 +88,7 @@ function option(string $value, string $desc, $attributes = []): string
             'windows-native' => 'Single Line Installer',
             'windows-chocolatey' => 'Chocolatey',
             'windows-scoop' => 'Scoop',
+            'windows-winget' => 'Winget',
             'windows-docker' => 'Docker',
             'windows-wsl-debian' => 'WSL/Debian',
             'windows-wsl-ubuntu' => 'WSL/Ubuntu',
diff --git a/include/download-instructions/windows-winget.php b/include/download-instructions/windows-winget.php
new file mode 100644
index 0000000000..e21ccd24a5
--- /dev/null
+++ b/include/download-instructions/windows-winget.php
@@ -0,0 +1,20 @@
+<p>
+On the command line, run the following commands:
+</p>
+<?php
+
+$wingetPackageName = 'PHP.PHP.' . $version;
+$wingetPackageDescription = 'PHP ' . $version . ' - Thread-safe';
+
+if (isset($options['usage']) && $options['usage'] === 'cli') {
+    $wingetPackageName = 'PHP.PHP.NTS.' . $version;
+    $wingetPackageDescription = 'PHP ' . $version . ' - Not-Thread safe';
+}
+?>
+<pre><code class="language-powershell line-numbers">
+# Download and install <?= $wingetPackageDescription ?>
+
+winget install <?= $wingetPackageName ?>
+</code></pre>
+<?php
+unset($wingetPackageDescription, $wingetPackageName);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.