PHP Compatibility Requirements

PHP Compatibility Requirements

Compatibility

The PHP Datadog Trace library is open source - view the Github repository for more information.

PHP APM supports the following PHP versions:

VersionSupport type
8.0.xFully Supported (as of 0.52.0)
7.4.xFully Supported
7.3.xFully Supported
7.2.xFully Supported
7.1.xFully Supported
7.0.xFully Supported
5.6.xFully Supported
5.5.xFully Supported (as of 0.49.0)
5.4.xFully Supported

PHP APM supports the following SAPI’s:

SAPISupport type
apache2handlerFully Supported
cliFully Supported
fpm-fcgiFully Supported
cgi-fcgiFully Supported

Integrations

Web framework compatibility

By default, Datadog supports all PHP web frameworks out of the box, with either framework-level instrumentation, or generic web tracing.

Framework-level instrumentation includes tracing of internal methods and framework specific tagging.

Generic web tracing includes a web.request span to track latency and errors that originated from the call, in addition to spans for supported libraries — for example: database and HTTP clients.

The following table enumerates some of the frameworks and versions Datadog successfully traces.

Web frameworks:

ModuleVersionsSupport TypeInstrumentation level
CakePHP2.xAll supported PHP versionsFramework-level instrumentation
CodeIgniter2.xPHP 7+Framework-level instrumentation
CodeIgniter3.xPHP 7+Generic web tracing
Laravel4.2, 5.x, 6.xAll supported PHP versionsFramework-level instrumentation
Laravel 88.x (as of 0.52.0)All supported PHP versionsFramework-level instrumentation
Lumen5.2+All supported PHP versionsFramework-level instrumentation
Symfony 33.3, 3.4All supported PHP versionsFramework-level instrumentation
Symfony 44.xAll supported PHP versionsFramework-level instrumentation
Symfony 55.x (as of 0.50.0)All supported PHP versionsFramework-level instrumentation
WordPress4.x, 5.xPHP 7+Framework-level instrumentation
Zend Framework1.12All supported PHP versionsFramework-level instrumentation
Zend Framework2.xAll supported PHP versionsGeneric web tracing
Yii1.1, 2.0All supported PHP versionsFramework-level instrumentation
DrupalAll supported PHP versionsGeneric web tracing
Magento1, 2All supported PHP versionsGeneric web tracing
Phalcon1.3, 3.4All supported PHP versionsGeneric web tracing
Slim2.x, 3.x, 4.xAll supported PHP versionsFramework-level instrumentation
Neos Flow1.1All supported PHP versionsGeneric web tracing
FuelPHP1.1PHP 7+Generic web tracing

Note that even if you don’t see your web framework in this list, it is supported out of the box with the latest release of the tracer.

Datadog is continuously adding more support for in-depth tracing for PHP web-frameworks. To request support for additional span metadata and framework internals, contact our awesome support team.

CLI library compatibility

Tracing from the CLI SAPI is disabled by default. To enable tracing of PHP CLI scripts, set DD_TRACE_CLI_ENABLED=true.

ModuleVersionsSupport Type
CakePHP Console2.xFully Supported
Laravel Artisan5.xFully Supported

To request support for additional CLI libraries, contact our awesome support team.

Datastore compatibility

ModuleVersionsSupport Type
Amazon RDS (using PDO or MySQLi)(Any Supported PHP)Fully Supported
Elasticsearch1.xFully Supported
EloquentLaravel supported versionsFully Supported
Memcached(Any Supported PHP)Fully Supported
MongoDB - via mongo extension1.4.xFully Supported
MySQLi(Any Supported PHP)Fully Supported
PDO (MySQL, PostgreSQL, MariaDB)(Any Supported PHP)Fully Supported
PhpRedis3, 4, 5Fully Supported
Predis1.1Fully Supported

To request support for additional datastores, contact our awesome support team.

Library compatibility

ModuleVersionsSupport Type
Curl(Any Supported PHP)Fully Supported
Guzzle5.xFully Supported
Guzzle6.xFully Supported

To request support for additional libraries, contact our awesome support team.

Deep call stacks on PHP 5

The call stack is limited on PHP 5. See the deep call stack troubleshooting page for more details.

Generators

Instrumenting generators is not supported on PHP 5 and PHP 7.

PCNTL

We currently do not offer support for PCNTL (Process control). Tracing applications that use functions such as pcntl_fork may result in unpredictable results.

Further Reading

Additional helpful documentation, links, and articles: