# PHP 7.4



#### Installer PHP 7.4

```bash
$ brew install php@7.4
```



### Changer de version de PHP:

#### Installer Brew PHP Switcher

```bash
$ brew install brew-php-switcher
```

Changer de version:

```bash
$ brew-php-switcher 7.3
```



Version de PHP (Apache):

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

Version de PHP (cli):

```bash
❯ 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:

```bash
❯ php --info | grep 'PHP API'
PHP API => 20190902
```

PECL et PEAR sont linkés:

```bash
❯ which pecl
/usr/local/bin/pecl

❯ which pear
/usr/local/bin/pear
```



#### Installer des extensions (avec [PECL](https://pecl.php.net)):

Requiert autoconf: `brew install autoconf`

```bash
$ 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
```

