mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 04:56:23 +00:00
21 lines
380 B
Markdown
21 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>
|