PHP Version
5.2+
$haystack = 'こんにちは、PHPのmb_stripos()関数の例です。'; // 'Hello, this is a PHP mb_stripos() function example.'
$needle = 'php';

$position = mb_stripos($haystack, $needle);

if ($position !== false) {
    echo 'Found at position: ' . $position;
} else {
    echo 'Substring not found.';
}

// Output: Found at position: 6

/*
 * Note:
 * In PHP, string indexes start at 0.
 * The index of the first character is 0, the second character is 1, and so on.
 */
$haystack = 'こんにちは、PHPのmb_stripos()関数の例です。'; // 'Hello, this is a PHP mb_stripos() function example.'
$needle = 'php';

$position = stripos($haystack, $needle);

if ($position !== false) {
    echo 'Found at position: ' . $position;
} else {
    echo 'Substring not found.';
}

// Output: Found at position: 18  <= Unexpected result (byte offset)
mb_stripos(
    string $haystack,
    string $needle,
    int $offset = 0,
    ?string $encoding = null
): int|false
$newstring = 'こんにちは';
$pos = mb_stripos($newstring, 'こ');

var_dump($pos); // int(0)
$str = 'Hello, World!';
$substring = 'hello';

$pos = mb_stripos($str, $substring);

var_dump($pos); // int(0)

if ($pos === false) {
    echo "The string 'hello' was not found.";
} else {
    echo "The string 'hello' is included in the text.";
}

// Output: The string 'hello' is included in the text.
$str = 'Hello, World!';
$substring = '';

$pos = mb_stripos($str, $substring); // Warning: mb_stripos(): Empty delimiter in