17.66. php

Possible arguments: (none), phpize, ext, zend, build, cli, cgi, mod, web, embed, pecl

Provide support for PHP. Add a runtime dependency on the default PHP version, lang/php56.


Use to build a PHP extension.


Use to build, install and register a PHP extension.


Use to build, install and register a Zend extension.


Set PHP also as a build-time dependency.


Needs the CLI version of PHP.


Needs the CGI version of PHP.


Needs the Apache module for PHP.


Needs the Apache module or the CGI version of PHP.


Needs the embedded library version of PHP.


Provide defaults for fetching PHP extensions from the PECL repository.

Variables are used to specify which PHP modules are required, as well as which version of PHP are supported.


The list of required PHP extensions at run-time. Add :build to the extension name to add a build-time dependency. Example: pcre xml:build gettext


Selects which major version of PHP will be installed as a dependency when no PHP is installed yet. Default is 56. Possible values: 55, 56, and 70.


The port does not work with PHP of the given version. Possible values: 55, 56, and 7.

When building a PHP or Zend extension with :ext or :zend, these variables can be set:


The name of the PHP or Zend extension. Default value is ${PORTNAME}.


A list of subdirectories from which to install header files. The framework will always install the header files that are present in the same directory as the extension.


The priority at which to load the extension. It is a number between 00 and 99.

For extensions that do not depend on any extension, the priority is automatically set to 20, for extensions that depend on another extension, the priority is automatically set to 30. Some extensions may need to be loaded before every other extension, for example www/php56-opcache. Some may need to be loaded after an extension with a priority of 30. In that case, add PHP_MOD_PRIO=XX in the port's Makefile. For example:

USES=		php:ext
USE_PHP=	wddx

All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.