PHPackages                             testcontainers/testcontainers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. testcontainers/testcontainers

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

testcontainers/testcontainers
=============================

Testcontainers implementation in PHP

1.0.8(2mo ago)199184.7k—4.7%30[12 issues](https://github.com/testcontainers/testcontainers-php/issues)[1 PRs](https://github.com/testcontainers/testcontainers-php/pulls)12MITPHPPHP &gt;= 8.1CI passing

Since Oct 23Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/testcontainers/testcontainers-php)[ Packagist](https://packagist.org/packages/testcontainers/testcontainers)[ RSS](/packages/testcontainers-testcontainers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (22)Used By (12)

Testcontainers for PHP
======================

[](#testcontainers-for-php)

Testcontainers is a PHP package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The package is inspired by the [Testcontainers](https://www.testcontainers.org/) project for Java.

Legacy PHP support
------------------

[](#legacy-php-support)

The official `testcontainers/testcontainers-php` library requires PHP 8.1 or newer. If you need to support older PHP versions, including those that are EOL, please check out the community-maintained [k-kinzal/testcontainers-php](https://github.com/k-kinzal/testcontainers-php) project. The discussion about supporting legacy versions lives in [issue #38](https://github.com/testcontainers/testcontainers-php/issues/38).

Installation
------------

[](#installation)

Add this to your project with composer

```
composer req --dev testcontainers/testcontainers
```

Usage/Examples
--------------

[](#usageexamples)

### Starting a general Container

[](#starting-a-general-container)

```
