# set_php_version

> Change the PHP version, then confirm it by reading the version back — it never reports success on an unconfirmed write.

- Tier: W
- Required scope: write:hosting
- Annotations: idempotentHint
- Docs: https://api.inleed.com/tools/set-php-version

## Description

Change the PHP version, then confirm it by reading the version back — it never reports success on an unconfirmed write. On a CloudLinux node the change goes through the CloudLinux PHP Selector and applies to the whole hosting account (`scope: account` in the response); elsewhere it is per-domain. Changing PHP can break a site written for an older version, so pick a version the application supports. This does not touch php.ini (use `set_php_settings`) or extensions (use `manage_php_extensions`).

## Input schema

- `input` — string (required). A domain, email address, website URL, numeric service id, or hosting-account username the customer actually owns. Resolved to the owning account automatically; the resolved target is echoed back in the response.
- `version` — string (required). The PHP version to switch to, e.g. 8.3.

## Example call

```json
{
  "name": "set_php_version",
  "arguments": {
    "input": "example.se",
    "version": "8.3"
  }
}
```

