wiki/content/20201113115452-str_ends_with.md

22 lines
397 B
Markdown
Raw Permalink Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:34:11 +00:00
date: 2020-11-13
2024-05-06 20:40:05 +00:00
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>