mirror of
https://github.com/alrayyes/wiki.git
synced 2024-12-01 15:26:23 +00:00
20 lines
380 B
Markdown
20 lines
380 B
Markdown
---
|
|
id: 43cb053d-03b0-4845-a804-5e34da5d8db5
|
|
title: str~endswith~()
|
|
---
|
|
|
|
# Description
|
|
|
|
Check if string ends with other string. Opposite of
|
|
[str~startswith~()](20201113115424-str_starts_with). See RFC[^1] for
|
|
more details.
|
|
|
|
# Syntax
|
|
|
|
``` php
|
|
str_ends_with('haystack', 'stack') // true
|
|
```
|
|
|
|
# Footnotes
|
|
|
|
[^1]: <https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions>
|