---
title: "Deprecation: #95257 - GeneralUtility::isFirstPartOfStr()"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-95257"
source: "Changelog/11.5/Deprecation-95257-GeneralUtilityisFirstPartOfStr.rst"
typo3-version: "11.5"
typo3-major: 11
type: "deprecation"
issue: 95257
forge: "https://forge.typo3.org/issues/95257"
tags: ["PHP-API", "FullyScanned", "ext:core"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Deprecation: #95257 - GeneralUtility::isFirstPartOfStr() {#deprecation-95257}

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

## Description {#description}

The helper method
`TYPO3\CMS\Core\Utility\GeneralUtility\GeneralUtility::isFirstPartOfStr()`
has been marked as deprecated, as the newly available PHP built-in
function `str_starts_with()` can be used instead, which
supports proper typing and is faster on PHP 8.0.

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

## Impact {#impact}

Calling `GeneralUtility::isFirstPartOfStr()` will trigger a PHP `E_USER_DEPRECATED` error.

## Affected Installations {#affected-installations}

TYPO3 installations using this TYPO3 API function - 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 `GeneralUtility::isFirstPartOfStr()` with
`str_starts_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) for further syntax.
