philcook / brew-php-switcher

Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP. If you support multiple products/projects that are built using either brand new or old legacy PHP functionality. For users of Homebrew (or brew for short) currently only.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Have you tested with PHP v8

mikeerickson opened this issue · comments

I know PHP v8 was just released, but I am eager to give it a whirl but I don’t want to have to spin up docker just to test PHP v8 (I would like to try it on a number of active PHP projects)

works for me...with modification

I added

php8_module="php_module"
apache_php8_lib_path="\/lib\/httpd\/modules\/libphp.so"

if [[ $(echo "$php_version" | sed 's/^php@//' | sed 's/\.//') -ge 80 ]]; then
    php_module="$php8_module"
    apache_php_lib_path="$apache_php8_lib_path"
fi

                if [ $(echo "$j" | sed 's/^php@//' | sed 's/\.//') -ge 80 ]; then
                    loop_php_module="$php8_module"
                    loop_apache_php_lib_path="$apache_php8_lib_path"
                fi

after all the php7 equivalent definitions / conditions