---
title: "Deprecation: #95293 - StringUtility::beginsWith() and StringUtility::endsWith()"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-95293"
source: "Changelog/11.5/Deprecation-95293-StringUtilitystartsWithAndStringUtilityendsWith.rst"
typo3-version: "11.5"
typo3-major: 11
type: "deprecation"
issue: 95293
forge: "https://forge.typo3.org/issues/95293"
tags: ["PHP-API", "FullyScanned", "ext:core"]
rendered: "2026-09-25T23:17:45+00:00"
---

# Deprecation: #95293 - StringUtility::beginsWith() and StringUtility::endsWith() {#deprecation-95293}

See [forge#95293](https://forge.typo3.org/issues/95293)

## Description {#description}

The helper methods `StringUtility::beginsWith()` and
`StringUtility::endsWith()` have been marked as deprecated, as the newly
available PHP-built in functions `str_starts_with()` and
`str_ends_with()` can be used instead, which support proper typing and
is faster on PHP 8.0.

For PHP 7.4 installations, the dependency `symfony/polyfill-php80` adds the
PHP functions in lower PHP environments, which TYPO3 Core ships as dependency
since TYPO3 v10 LTS.

## Impact {#impact}

Calling `StringUtility::beginsWith()` or `StringUtility::endsWith()`
will trigger a PHP `E_USER_DEPRECATED` error.

## Affected Installations {#affected-installations}

TYPO3 installations using these TYPO3 API functions - either via extensions or
in their own site-specific code. An analysis via TYPO3's extension scanner
will show any matches.

## Migration {#migration}

Replace all calls of `StringUtility::beginsWith()` with
`str_starts_with()` and `StringUtility::endsWith()`
with `str_ends_with()` to avoid deprecation warnings and to keep your
code up-to-date.

See [php.net: str-starts-with](https://www.php.net/manual/en/function.str-starts-with.php)
and [php.net: str-ends-with](https://www.php.net/manual/en/function.str-ends-with.php)
for further syntax.
