Skip to content
The documentation is not yet completly updated for Version 0.4. This will be done within the next few days.

PHP

Within this config section all settings related to be PHP can be defined.

The following example shows all settings that can be set and which will be explained on this page:

php:
version: 8.1
config:
opcache.enable: off
xdebug.mode: off
xdebug.start_with_request: yes
configWeb:
memory_limit: 512M
configCLI:
max_execution_time: 0
memory_limit: -1
packages:
- php-soap

With this setting the currently active PHP version can be defined. If you want to change the version during runtime you can use the webdev php version command. It will also list all available versions.

Default value: If not defined, it will always use the latest version installed in the container

Example

php:
version: 8.1

Under this config setting we can define the “global” settings for php, which means if they are not overwritten by configWeb or configCLI, these settings will be applied. Changing a setting and applying it to the current workspace can be done via the webdev php ini set command.

Default value: If not defined, it will use the default php settings

Example

php:
config:
opcache.enable: off
xdebug.mode: off
xdebug.start_with_request: yes

If you want to change the settings specific for the webserver, then put these settings in this section.

Default value: If not defined, it will use the default php settings

Example

php:
configWeb:
memory_limit: 512M

If you want to change the settings specific for CLI, then put these settings in this section.

Default value: If not defined, it will use the default php settings

Example

php:
configCLI:
max_execution_time: 0
memory_limit: -1

If you want to install additional packages, you can add them here and they will be installed via the webdev restore php command.

Default value: If not defined, no additional packages will be installed

Example:

php:
packages:
- php-soap