← All built-ins / rtrim()
rtrim()
rtrim(...$args): string
Parameters
| Name | Type | Description |
|---|---|---|
| $s | string | input string |
Return value
The string without trailing whitespace.
Example
echo "[" . rtrim(" hello ") . "]";[ hello]
| Name | Type | Description |
|---|---|---|
| $s | string | input string |
The string without trailing whitespace.
echo "[" . rtrim(" hello ") . "]";[ hello]