Version 1 is the current stable release of the PHP SDK. It exposes a single Surreal class with direct, RPC-style methods such as create(), select(), query(), and signin(). Each method maps closely to a SurrealDB RPC call.
Note
The SDK requires PHP 8.2 or later and the curl extension. It connects to a remote SurrealDB instance over HTTP or WebSocket.
Getting started
Installation
Install the SDK with Composer.
Quickstart
Connect to SurrealDB and run your first queries.
Concepts
Connecting to SurrealDB
Initialize the SDK, connect, and select a namespace and database.
Authentication
Sign up and sign in users with scopes, credentials, and tokens.
Executing queries
Create, select, update, and delete records.
Methods
The full reference of methods on the Surreal class.