Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 660 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 660 Bytes

switch-php

Installs and switches between different versions of PHP (7.4, 8.1, and 8.3).

Configuration

Add PHP modules to the httpd.conf file to load the correct PHP module for each version:

# Load PHP 7.4 Module
LoadModule php7_module /opt/homebrew/opt/[email protected]//lib/httpd/modules/libphp7.so

# Load PHP 8.1 Module
LoadModule php_module /opt/homebrew/opt/[email protected]/lib/httpd/modules/libphp.so

# Load PHP 8.3 Module
LoadModule php_module /opt/homebrew/opt/[email protected]/lib/httpd/modules/libphp.so

Make sure these paths match the location of the PHP modules installed by Homebrew.

Usage

switch-php 7.4
switch-php 8.1
switch-php 8.3