The SurrealDB SDK for PHP is the primary SDK for interacting with SurrealDB from server-side applications, systems, and APIs, allowing you to integrate SurrealDB into your website or application backend, and serve dynamic content to your users. You can use the PHP SDK to interact with your SurrealDB database instances, with functionality for executing queries, managing data, running database functions, authenticating to the database, building user signup and authentication functionality, and subscribing to data changes with live queries. When connecting to remote database instances, connections automatically reconnect when terminated.
ImportantThe SDK requires PHP version
8.2
or greater, and is available as a Composer package.
NoteThe SDK works seamlessly with SurrealDB versions
v2.0.0
tov2.1.4
, ensuring compatibility with the latest version.
To contribute to the SDK code, submit an Issue or Pull Request in the surrealdb.php repository. To contribute to this documentation, submit an Issue or Pull Request in the docs.surrealdb.com repository.