mb_stristr

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

mb_stristrFinds first occurrence of a string within another, case insensitive

Beschreibung

mb_stristr(
    string $haystack,
    string $needle,
    bool $before_needle = false,
    ?string $encoding = null
): string|false

mb_stristr() finds the first occurrence of needle in haystack and returns the portion of haystack. Unlike mb_strstr(), mb_stristr() is case-insensitive. If needle is not found, it returns false.

Parameter-Liste

haystack

The string from which to get the first occurrence of needle

needle

The string to find in haystack

before_needle

Determines which portion of haystack this function returns. If set to true, it returns all of haystack from the beginning to the first occurrence of needle (excluding needle). If set to false, it returns all of haystack from the first occurrence of needle to the end (including needle).

encoding

Character encoding name to use. If it is omitted, internal character encoding is used.

Rückgabewerte

Returns the portion of haystack, or false if needle is not found.

Changelog

Version Beschreibung
8.0.0 needle akzeptiert nun eine leere Zeichenkette.
8.0.0 encoding ist nun nullable (akzeptiert den null-Wert).

Siehe auch

  • stristr() - Wie strstr, aber unabhängig von Groß- bzw. Kleinschreibung
  • strstr() - Findet das erste Vorkommen eines Strings
  • mb_strstr() - Finds first occurrence of a string within another

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

U4GM Where to Farm Diablo 4 Season 12 Items Fast

Season 12 clicked for me a lot faster than I expected, mostly because the whole Butcher angle actually changes how you play instead of just dressi ...

Geschrieben von StormyWings am 16.04.2026 05:38:34
Forum: Off-Topic Diskussionen
Diablo 4 Season 13 No PTR? Full Guide to Release Date, Changes

Diablo 4 Season 12 is currently underway, and I believe many players, like myself, are already eagerly anticipating Season 13! However, according ...

Geschrieben von abnerRRR am 16.04.2026 03:55:07
Forum: Off-Topic Diskussionen
EZG.com: Your Go-To Platform for Effortless Success in Monopoly GO Ever After

Shocking! Monopoly GO stickers are incredibly cheap on EZG.com! With the release of Monopoly Go's new album Ever After, I was looking for a relia ...

Geschrieben von abnerRRR am 16.04.2026 03:50:55
Forum: Off-Topic Diskussionen
ARC Raiders Week 24 Trials Explained | Fast Completion Guide

If you're like me and follow every official ARC Raiders update, you'll see they release trailers for the new map. But to actually experience this ...

Geschrieben von abnerRRR am 16.04.2026 03:46:51
Forum: Off-Topic Diskussionen