Aller au contenu

PHP 7.4

Installer PHP 7.4

$ brew install php@7.4

Changer de version de PHP:

Installer Brew PHP Switcher

$ brew install brew-php-switcher

Changer de version:

$ brew-php-switcher 7.3

Version de PHP (Apache):

 php --info | grep 'PHP Version' | sed -n '1p'
PHP Version => 7.4.9

Version de PHP (cli):

 php -v
PHP 7.4.9 (cli) (built: Aug  7 2020 19:23:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies
    with Xdebug v2.9.6, Copyright (c) 2002-2020, by Derick Rethans

Version de l'API:

 php --info | grep 'PHP API'
PHP API => 20190902

PECL et PEAR sont linkés:

 which pecl
/usr/local/bin/pecl

❯ which pear
/usr/local/bin/pear

Installer des extensions (avec PECL):

Requiert autoconf: brew install autoconf

$ pecl uninstall -r xdebug

$ pecl install xdebug
$ pecl install yaml
$ pecl install apcu
$ pecl install imagick
$ pecl install ssh2


$ pecl install memcached
$ pecl install redis


# Pour une version spécifique:
$ pecl install xdebug-2.7.0beta1

Dernière mise à jour: November 9, 2023