atatus_set_status_code()
function is used to set a status code for a transaction.
Compatibility
Requires PHP agent version 1.16.1 or higher.
Syntax
copy
atatus_set_status_code($statuscode)
Parameter
atatus_set_status_code()
need to pass status code value.
Parameter | Type | Description |
---|---|---|
$statuscode | Integer (Required) | Status Code. |
Example
In the following example, you will need to set a custom status code using the atatus_set_status_code($statuscode)
copy
<?php
function example() {
if (extension_loaded('atatus')) { // ensure PHP agent is available
atatus_set_status_code(204);
}
// ...
}