# version

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

This method retrieves the current version of a remote database.

```php title="Method Syntax"
$db->version();
```

## Example usage
```php
try {
	$version = $db->version();
	echo "The remote database is running version $version.";
} catch (Exception $e) {
	echo "An error occurred while retrieving the version: " . $e->getMessage();
}

```
