Через homebrew не нашел такой возможности, пробовал компилировать, натыкаюсь на такую ошибку:
configure: error: Package requirements (openssl >= 1.0.2) were not met:
No package 'openssl' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
на этапе
./configure --prefix=/usr/local/php --enable-zts --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/etc/conf.d --with-openssl=/opt/homebrew/opt/openssl@3 --with-zlib --with-curl --enable-mbstring --with-libxml --enable-sockets --enable-soap --enable-calendar --with-jpeg --with-webp --with-xpm --with-freetype --enable-gd --enable-exif --with-mysqli --with-pdo-mysql --with-iconv --with-gettext --with-xmlrpc --with-xsl --enable-opcache --with-pear --with-intl --with-readline --enable-phar --enable-json --with-mcrypt