PHPackages                             datastax/php-driver - 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. [Database &amp; ORM](/categories/database)
4. /
5. datastax/php-driver

ActiveLibrary[Database &amp; ORM](/categories/database)

datastax/php-driver
===================

DataStax PHP Driver for Apache Cassandra

v1.3.2(8y ago)437521.5k↓15.1%151[6 PRs](https://github.com/datastax/php-driver/pulls)18Apache-2.0CPHP &gt;=5.6.0CI failing

Since Apr 2Pushed 2y ago63 watchersCompare

[ Source](https://github.com/datastax/php-driver)[ Packagist](https://packagist.org/packages/datastax/php-driver)[ Docs](http://datastax.github.io/php-driver/)[ RSS](/packages/datastax-php-driver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (23)Used By (18)

⚠️ **The PHP driver is in maintenance mode. We are still accepting pull-requests and we will occasionally release critical bug fixes, but no ongoing active development is being done currently.**

DataStax PHP Driver for Apache Cassandra
========================================

[](#datastax-php-driver-for-apache-cassandra)

[![Build Status: Linux](https://camo.githubusercontent.com/5e8723240ede59fc146692bfc20a988652b87c3b8a94eede548c07ae7ae68746/68747470733a2f2f7472617669732d63692e6f72672f64617461737461782f7068702d6472697665722e737667)](https://travis-ci.org/datastax/php-driver)[![Build Status: Windows](https://camo.githubusercontent.com/944a3ff8367f613acd90b9d51fc9f4bf111db11ab9971d66b7ba71a2d2d9fd17/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f38767278706b666c34786d3266336e6d3f7376673d74727565)](https://ci.appveyor.com/project/DataStax/php-driver)

A modern, [feature-rich](/features) and highly tunable PHP client library for [Apache Cassandra](http://cassandra.apache.org) 2.1+ using exclusively Cassandra's binary protocol and Cassandra Query Language v3. **Use the [DSE PHP driver](http://docs.datastax.com/en/developer/php-driver-dse/latest) for better compatibility and support for [DataStax Enterprise](http://www.datastax.com/products/datastax-enterprise)**.

This is a wrapper around the [DataStax C/C++ Driver for Apache Cassandra](http://docs.datastax.com/en/developer/cpp-driver/latest).

**Note**: DataStax products do not support big-endian systems.

Getting the Driver
------------------

[](#getting-the-driver)

Binary versions of the driver, available for multiple operating systems and multiple versions of PHP, can be obtained from [DataStax download server](http://downloads.datastax.com/php-driver). The source code is made available via [GitHub](https://github.com/datastax/php-driver). **If you're using [DataStax Enterprise](http://www.datastax.com/products/datastax-enterprise)use the [DSE PHP driver](http://docs.datastax.com/en/developer/php-driver-dse/latest) instead**.

**Note**: The driver extension is a wrapper around the [DataStax C/C++ Driver for Apache Cassandra](http://docs.datastax.com/en/developer/cpp-driver/latest) and is a requirement for proper installation of the PHP extension binaries. Ensure these dependencies are met before proceeding.

What's new in v1.2.0/v1.3.0
---------------------------

[](#whats-new-in-v120v130)

- Support for [`duration`](/features/duration.feature)
- `Session::execute()` and `Session::executeAsync()` now support a [simple string](/features/simple_string_queries.feature) for the query CQL and a simple array for the query execution option
- Full support for Apache Cassandra 2.2 and 3.0+
- Support for [`tinyint` and `smallint`](/features/datatypes.feature#L92)
- Support for [`date`](/features/datatypes.feature#L135) and [`time`](/features/datatypes.feature#L170)
- Support for [user-defined function and aggregate](/features/function_and_aggregate_metadata.feature) metadata
- Support for [secondary index](/features/secondary_index_metadata.feature) and [materialized view](/features/materialized_view_metadata.feature) metadata

Compatibility
-------------

[](#compatibility)

This driver works exclusively with the Cassandra Query Language v3 (CQL3) and Cassandra's native protocol. The current version works with:

- Apache Cassandra versions 2.1, 2.2 and 3.0+
- PHP 5.6, PHP 7.0, and PHP 7.1
    - 32-bit (x86) and 64-bit (x64)
    - Thread safe (TS) and non-thread safe (NTS)
- Compilers: GCC 4.1.2+, Clang 3.4+, and MSVC 2010/2012/2013/2015

If using [DataStax Enterprise](http://www.datastax.com/products/datastax-enterprise) the [DSE PHP driver](http://docs.datastax.com/en/developer/php-driver-dse/latest) provides more features and better compatibility.

Documentation
-------------

[](#documentation)

- [Home](http://docs.datastax.com/en/developer/php-driver/latest)
- [API](http://docs.datastax.com/en/developer/php-driver/latest/api)
- [Features](/features)

Getting Help
------------

[](#getting-help)

- JIRA:
- Mailing List:
- DataStax Academy via Slack:

Quick Start
-----------

[](#quick-start)

```
