Windows11 scoopを使用してphpをインストールする方法
環境
エディション Windows 11 Pro
バージョン 22H2
システムの種類 64bit
操作方法
1.PHPパッケージを検索します
scoop search php
実行結果
PS C:\Users\user> scoop search php Results from local buckets... Name Version Source Binaries ---- ------- ------ -------- php-nts 8.2.8 main php 8.2.8 main
2.phpをインストールします
scoop install php
実行結果
PS C:\Users\user> scoop install php Installing 'php' (8.2.8) [64bit] from main bucket php-8.2.8-Win32-vs16-x64.zip (30.3 MB) [======================================================================] 100% Checking hash of php-8.2.8-Win32-vs16-x64.zip ... ok. Extracting php-8.2.8-Win32-vs16-x64.zip ... done. Running pre_install script... Linking ~\scoop\apps\php\current => ~\scoop\apps\php\8.2.8 Creating shim for 'php'. Creating shim for 'php-cgi'. Creating shim for 'phpdbg'. Persisting cli Persisting php.ini-production Running post_install script... 'php' (8.2.8) was installed successfully! 'php' suggests installing 'extras/vcredist2022'.
3.PHPバージョンを確認します
PS C:\Users\user> php -v PHP 8.2.8 (cli) (built: Jul 4 2023 15:53:15) (ZTS Visual C++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.2.8, Copyright (c) Zend Technologies