I have released an initial commit for a PHP client that implements the CQL binary protocol. This is a work in progress but it is functional enough for you to send queries to a Cassandra cluster. I’m building tests first then implementing the functionality, so I should have decent test coverage when complete. The tests require a running Cassandra cluster, and they create a keyspace, column family, and columns and clean up when the tests are complete.
I’ll do additional posts about the functionality as I get more features implemented, and tests created.
It’s on Github – https://github.com/rmcfrazier/phpbinarycql so please check it out and if you see any issues open bugs.
Included is a very simple example that shows how to connect and send a query.
$queryText = 'select * from system.schema_keyspaces';
$response = $pbc->query($queryText, \McFrazier\PhpBinaryCql\CqlConstants::QUERY_CONSISTENCY_ONE);
// view the entire response object