docs/recipe/provision/php.md
<!-- DO NOT EDIT THIS FILE! -->
<!-- Instead edit recipe/provision/php.php -->
<!-- Then run bin/docgen -->
# Php Recipe
```php
require 'recipe/provision/php.php';
```
[Source](/recipe/provision/php.php)
## Configuration
### php_version
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/php.php#L5)
```php title="Default value"
$defaultphpVersion = file_exists('composer.json')
? explode('|', preg_replace('/[^0-9.|]+/', '', json_decode(file_get_contents('composer.json'), true)['require']['php'] ?? '8.3'))[0]
: '8.3';
return ask(' What PHP version to install? ', $defaultphpVersion, ['5.6', '7.4', '8.0', '8.1', '8.2']);
```
## Tasks
### provision:php
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/php.php#L13)
Installs PHP packages.
### logs:php-fpm
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/php.php#L66)
Shows php-fpm logs.
### provision:composer
[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/php.php#L71)
Installs Composer.