Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find the position of the first occurrence of a substring in a string
<?php strpos(string $haystack, string $needle, int $offset = 0): int|false
<?php     {

        $prefix = $connection->getTablePrefix();



        return strpos($table, $prefix) === 0

            ? substr($table, strlen($prefix))

            : $table;

    }
<?php     protected function extractQueryString($path)

    {

        if (($queryPosition = strpos($path, '?')) !== false) {

            return [

                substr($path, 0, $queryPosition),

                substr($path, $queryPosition),
<?php             return $subject;

        }



        $position = strpos($subject, $search);



        if ($position !== false) {

            return substr_replace($subject, $replace, $position, strlen($search));
<?php             return $subject;

        }



        $position = strpos($subject, $search, $offset);



        if ($position !== false) {

            return [
<?php     public function hasHintInformation($name)

    {

        return strpos($name, static::HINT_PATH_DELIMITER) > 0;

    }
<?php     {

        $mySqlVersion = DB::select('select version()')[0]->{'version()'} ?? '';



        if (strpos($mySqlVersion, 'Maria') !== false) {

            $this->markTestSkipped('Lateral joins are not supported on MariaDB'.__CLASS__);

        } elseif ((float) $mySqlVersion < '8.0.14') {

            $this->markTestSkipped('Lateral joins are not supported on MySQL < 8.0.14'.__CLASS__);
<?php                     $arg['Destinations'] === ['me@example.com', 'you@example.com'] &&

                    $arg['ListManagementOptions'] === ['ContactListName' => 'TestList', 'TopicName' => 'TestTopic'] &&

                    $arg['Tags'] === [['Name' => 'FooTag', 'Value' => 'TagValue']] &&

                    strpos($arg['RawMessage']['Data'], 'Reply-To: Taylor Otwell <taylor@example.com>') !== false;

            }))

            ->andReturn($sesResult);
<?php                     $arg['Destination']['ToAddresses'] === ['me@example.com', 'you@example.com'] &&

                    $arg['ListManagementOptions'] === ['ContactListName' => 'TestList', 'TopicName' => 'TestTopic'] &&

                    $arg['Tags'] === [['Name' => 'FooTag', 'Value' => 'TagValue']] &&

                    strpos($arg['Content']['Raw']['Data'], 'Reply-To: Taylor Otwell <taylor@example.com>') !== false;

            }))

            ->andReturn($sesResult);