installphp.info


← Back to home page

Install PHP 8.3 on macOS 14

This version of PHP is actively supported.

Good news! PHP 8.3 is being actively supported through 31 Dec 2025. After that point, it's advisable to upgrade to the latest version, since the PHP team will only offer security-related support until 31 Dec 2027, at which point PHP 8.3 will be considered "end-of-life".

Installing PHP 8.3 on macOS 14

Prerequisites

  • macOS 14 (Sonoma) installed
  • Command Line Tools for Xcode
  • Homebrew package manager

Installation

  1. Open Terminal
  2. Update Homebrew:
    brew update
  3. Install PHP 8.3:
    brew install [email protected]
  4. Link PHP 8.3:
    brew link [email protected]
  5. Add PHP to your PATH:
    echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
  6. Reload your shell configuration:
    source ~/.zshrc

Verification

  1. Check PHP version:
    php -v
  2. Verify PHP configuration:
    php -i
  3. Test PHP by creating a simple script:
    echo '<?php phpinfo();' > test.php
    php test.php