← All built-ins / chop()
chop()
chop(string $s): string
Parameters
| Name | Type | Description |
|---|---|---|
| $s | string | input string |
Return value
Same as rtrim().
Example
echo "[" . chop("hello\n") . "]";[hello]
| Name | Type | Description |
|---|---|---|
| $s | string | input string |
Same as rtrim().
echo "[" . chop("hello\n") . "]";[hello]