• Start

Languages

/

PHP

/

Methods

status

The status method in the SurrealDB PHP SDK retrieves the current status of a remote database.

This method retrieves the current status of a remote database.

Method Syntax

$db->status();
$status = $db->status();
echo "The status code is: $status."; // 200 or 500

The status function returns 200 if the database is running and 500 if the database is down or cannot be reached.

Was this page helpful?