Native protocol, no PHP overhead
Queries run through the ScyllaDB C/C++ driver. Result rows decode in C and arrive as PHP values. No CQL parsing or text protocol in userland.
How it works
A C extension that speaks the CQL binary protocol directly. Built on the ScyllaDB C/C++ driver, with token-aware routing, prepared statements, async futures, and full CQL type support.
<?php
$session = Cassandra::cluster()
->withContactPoints('10.0.0.1', '10.0.0.2', '10.0.0.3')
->withPort(9042)
->withCredentials('scylla', getenv('SCYLLA_PASSWORD'))
->withDefaultConsistency(Cassandra::CONSISTENCY_LOCAL_QUORUM)
->withTokenAwareRouting(true)
->build()
->connect('shop');
$statement = $session->prepare('SELECT id, email FROM users WHERE id = ?');
$rows = $session->execute($statement, [
'arguments' => [new Cassandra\Uuid('7b5a4c1e-8f2a-4c9e-9a1b-3c2d1e0f5a6b')],
]);
foreach ($rows as $row) {
printf("%s <%s>\n", $row['id'], $row['email']);
}Read the quick start for a complete first application, or go to clusters and sessions for the full connection model.