---
title: PHP Compatibility Requirements
description: Compatibility Requirements for the PHP tracer
breadcrumbs: >-
  Docs > APM > Application Instrumentation > Compatibility Requirements > PHP
  Compatibility Requirements
---

# PHP Compatibility Requirements

{% alert level="info" %}
This documentation is for the PHP tracer v1.x. If you are looking for the PHP tracer v0.x documentation, see the legacy [PHP Compatibility Requirements ](https://docs.datadoghq.com/tracing/trace_collection/compatibility/php_v0/)documentation.
{% /alert %}

## Runtime support policy for PHP APM{% #runtime-support-policy-for-php-apm %}

The PHP Datadog Trace library is open source - view the [GitHub repository](https://github.com/DataDog/dd-trace-php) for more information.

Datadog APM for PHP is built upon dependencies defined in specific versions of the host operating system, PHP runtime, certain PHP libraries, and the Datadog Agent or API. When these versions are no longer supported by their maintainers, Datadog APM for PHP limits its support for these as well.

#### Levels of support{% #levels-of-support %}

| **Level**                 | **Support provided**                                                                                                                                                |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Unsupported               | No implementation. [Contact our customer support team for special requests.](https://www.datadoghq.com/support/)                                                    |
| Preview                   | Initial implementation. May not yet contain all features. Support for new features, bug, and security fixes provided on a best-effort basis.                        |
| General Availability (GA) | Full implementation of all features. Full support for new features, bug, and security fixes.                                                                        |
| Maintenance               | Full implementation of existing features. Does not receive new features. Support for bug and security fixes only.                                                   |
| Legacy                    | Legacy implementation. May have limited function, but no maintenance provided. [Contact the support team](https://www.datadoghq.com/support/) for special requests. |
| End-of-life (EOL)         | No support. The version can still be used but no bug fixes are provided.                                                                                            |

PHP APM supports the following PHP versions (both ZTS and NTS):

{% alert level="info" %}
**Note:** PHP 5.x is not supported starting version 1.0.0. If you are using PHP 5, you can still use the PHP tracer up to version [0.99](https://github.com/DataDog/dd-trace-php/releases/tag/0.99.0).If you are using PHP 5.x version in your application and have a feature request which is critical for your business needs, contact [Datadog Support](https://www.datadoghq.com/support/).It's recommended to use [officially supported versions](https://www.php.net/supported-versions) of PHP, especially 8.0+.
{% /alert %}

| PHP Version | Support level        | Package version |
| ----------- | -------------------- | --------------- |
| 8.4.x       | General Availability | \> `1.5.0+`     |
| 8.3.x       | General Availability | \> `0.93.0+`    |
| 8.2.x       | General Availability | \> `0.82.0+`    |
| 8.1.x       | General Availability | \> `0.66.0+`    |
| 8.0.x       | General Availability | \> `0.52.0+`    |
| 7.4.x       | General Availability | All             |
| 7.3.x       | General Availability | All             |
| 7.2.x       | General Availability | All             |
| 7.1.x       | General Availability | All             |
| 7.0.x       | General Availability | All             |
| 5.6.x       | EOL                  | < `1.0.0`       |
| 5.5.x       | EOL                  | < `1.0.0`       |
| 5.4.x       | EOL                  | < `1.0.0`       |

PHP APM supports the following SAPI's:

| SAPI           | Support type               |
| -------------- | -------------------------- |
| apache2handler | All supported PHP versions |
| cli            | All supported PHP versions |
| fpm-fcgi       | All supported PHP versions |
| cgi-fcgi       | All supported PHP versions |
| FrankenPHP     | All supported PHP versions |

## Supported processor architectures{% #supported-processor-architectures %}

PHP APM supports the following architectures:

| Processor architectures                 | Support level | Package version | Support Type               |
| --------------------------------------- | ------------- | --------------- | -------------------------- |
| Linux GNU amd64 (`x86-64-linux-gnu`)    | GA            | All             | All supported PHP versions |
| Linux MUSL amd64 (`x86-64-linux-musl`)  | GA            | All             | All supported PHP versions |
| Linux GNU arm64 (`aarch64-linux-gnu`)   | GA            | \> `0.78.0`     | All supported PHP versions |
| Linux MUSL arm64 (`aarch64-linux-musl`) | GA            | \> `0.78.0`     | All supported PHP versions |
| Windows amd64 (`x86_64-windows`)        | GA            | \> `0.98.0`     | PHP 7.2+                   |

### Integrations{% #integrations %}

#### Web framework compatibility{% #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**:

| Module         | Versions                                                                                                                                                                                                       | Support Type                    | Instrumentation level           |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------------- |
| CakePHP        | 2.x, 3.x, 4.x, 5.x                                                                                                                                                                                             | All supported PHP versions      | Framework-level instrumentation |
| CodeIgniter    | 2.x                                                                                                                                                                                                            | All supported PHP versions      | Framework-level instrumentation |
| CodeIgniter    | 3.x                                                                                                                                                                                                            | All supported PHP versions      | Generic web tracing             |
| Drupal         | All supported PHP versions                                                                                                                                                                                     | Framework-level instrumentation |
| FuelPHP        | 1.1                                                                                                                                                                                                            | All supported PHP versions      | Generic web tracing             |
| Laminas        | All supported PHP versions                                                                                                                                                                                     | Framework-level instrumentation |
| Laravel        | 4.2, 5.x, 6.x                                                                                                                                                                                                  | All supported PHP versions      | Framework-level instrumentation |
| Laravel 8+     | 8.x, 9.x, 10.x, 11.x (tracer `0.52.0+`)                                                                                                                                                                        | All supported PHP versions      | Framework-level instrumentation |
| Lumen          | 5.2+                                                                                                                                                                                                           | All supported PHP versions      | Framework-level instrumentation |
| Magento        | 1                                                                                                                                                                                                              | All supported PHP versions      | Generic web tracing             |
| Magento        | 2                                                                                                                                                                                                              | All supported PHP versions      | Framework-level instrumentation |
| Neos Flow      | 1.1                                                                                                                                                                                                            | All supported PHP versions      | Generic web tracing             |
| Phalcon        | 1.3, 3.4                                                                                                                                                                                                       | All supported PHP versions      | Generic web tracing             |
| RoadRunner     | SDK (RoadRunner uses two versioning schemes: semantic versioning (3.x) for the SDK component, and calendar versioning (2024.x) for the server. For compatibility purposes, refer to the SDK version.) 2.x, 3.x | All supported PHP versions      | Framework-level instrumentation |
| Slim           | 2.x, 3.x, 4.x                                                                                                                                                                                                  | All supported PHP versions      | Framework-level instrumentation |
| Symfony        | 2.x, 3.3, 3.4, 4.x, 5.x, 6.x, 7.x                                                                                                                                                                              | All supported PHP versions      | Framework-level instrumentation |
| WordPress      | 4.x, 5.x, 6.x                                                                                                                                                                                                  | All supported PHP versions      | Framework-level instrumentation |
| Yii            | 2.0                                                                                                                                                                                                            | All supported PHP versions      | Framework-level instrumentation |
| Zend Framework | 1.12, 1.21                                                                                                                                                                                                     | All supported PHP versions      | Framework-level instrumentation |
| Zend Framework | 2.x                                                                                                                                                                                                            | All supported PHP versions      | 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](https://docs.datadoghq.com/help).

#### CLI library compatibility{% #cli-library-compatibility %}

Tracing from the CLI SAPI is enabled by default. To selectively disable tracing of PHP CLI scripts, set `DD_TRACE_CLI_ENABLED=false`.

| Module          | Versions            | Support Type               |
| --------------- | ------------------- | -------------------------- |
| CakePHP Console | 2.x, 3.x            | All supported PHP versions |
| Laravel Artisan | 5.x, 8.x, 9.x, 10.x | All supported PHP versions |
| Symfony CLI     | 4.x, 5.x, 6.x, 7.x  | All supported PHP versions |

To request support for additional CLI libraries, contact our awesome [support team](https://docs.datadoghq.com/help).

#### Datastore compatibility{% #datastore-compatibility %}

| Module                                                              | Versions                   | Support Type               |
| ------------------------------------------------------------------- | -------------------------- | -------------------------- |
| Amazon RDS (using PDO or MySQLi)                                    | *(Any Supported PHP)*      | All supported PHP versions |
| Elasticsearch                                                       | 1+                         | All supported PHP versions |
| Eloquent                                                            | Laravel supported versions | All supported PHP versions |
| Laravel Queues                                                      | Laravel supported versions | All supported PHP versions |
| Memcache                                                            | *(Any Supported PHP)*      | All supported PHP versions |
| Memcached                                                           | *(Any Supported PHP)*      | All supported PHP versions |
| MongoDB - via [mongo](https://pecl.php.net/package/mongo) extension | 1.4.x                      | All supported PHP versions |
| MySQLi                                                              | *(Any Supported PHP)*      | All supported PHP versions |
| PDO                                                                 | *(Any Supported PHP)*      | All supported PHP versions |
| PhpRedis                                                            | 3, 4, 5                    | All supported PHP versions |
| Predis                                                              | 1.1                        | All supported PHP versions |
| SQLSRV                                                              | *(Any Supported PHP)*      | All supported PHP versions |

**Note**: Redis 6.0+ supports inline authentication in commands such as `HELLO`, `MIGRATE`, and `ACL SETUSER`.

- **Datadog Trace Agent**: The minimum required and recommended version is `7.76.1` to ensure authentication parameters are automatically obfuscated in trace metadata.
- **Datadog Lambda Extension** (Serverless environments): The minimum required version is `v28.0.0`.

To request support for additional datastores, contact our awesome [support team](https://docs.datadoghq.com/help).

#### Library compatibility{% #library-compatibility %}

| Module                                                    | Versions                   | Support Type               |
| --------------------------------------------------------- | -------------------------- | -------------------------- |
| [php-amqplib](https://github.com/php-amqplib/php-amqplib) | 2.x, 3.x                   | PHP 7.1+                   |
| Curl                                                      | *(Any Supported PHP)*      | All supported PHP versions |
| Guzzle                                                    | 5.x, 6.x, 7.x              | All supported PHP versions |
| Laravel Queue                                             | Laravel supported versions | All supported PHP versions |
| [OpenAI](https://github.com/openai-php/client)            | OpenAI supported versions  | All supported PHP versions |
| Symfony Messenger                                         | 4.4, 5.x, 6.x, 7.x         | All supported PHP versions |

To request support for additional libraries, contact our awesome [support team](https://docs.datadoghq.com/help).

### PCNTL{% #pcntl %}

Datadog supports tracing forked processes using [pcntl](https://www.php.net/manual/en/book.pcntl.php). When a call to `pcntl_fork` is detected, a dedicated span is created, and the forked process is instrumented. This can be disabled with `DD_TRACE_FORKED_PROCESS`. Refer to the [library configuration page](https://docs.datadoghq.com/tracing/trace_collection/library_config/php/#environment-variable-configuration) for more details.

If the application invokes `pcntl_unshare(CLONE_NEWUSER);` and the tracer is installed, the application fatally crashes. This happens because `unshare` with `CLONE_NEWUSER` requires the process [not to be threaded](https://man7.org/linux/man-pages/man2/unshare.2.html), while the PHP tracer uses a separate thread to send traces to the Datadog Agent without blocking the main process.

## Further Reading{% #further-reading %}

- [Instrument Your Application](https://docs.datadoghq.com/tracing/trace_collection/dd_libraries/php)
