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     $information = json_decode($filesystem->read($composerFile), true);



    foreach ($information['require'] as $dependency => $constraint) {

        if (strpos($dependency, 'ext-') === 0) {

            continue;

        }
<?php         $prefix = rtrim($prefix, '/') . '/';



        foreach (array_keys($this->files) as $path) {

            if (strpos($path, $prefix) === 0) {

                unset($this->files[$path]);

            }

        }
<?php                     continue;

                }



                if ($deep === true || strpos($subPath, '/') === false) {

                    yield new FileAttributes(ltrim($path, '/'), $file->fileSize(), $file->visibility(), $file->lastModified(), $file->mimeType());

                }

            }
<?php     private function determineFilesystemAndPath(string $path): array

    {

        if (strpos($path, '://') < 1) {

            throw UnableToResolveFilesystemMount::becauseTheSeparatorIsMissing($path);

        }
<?php             $itemPath = $stats['name'];



            if ($prefixedPath === $itemPath || strpos($itemPath, $prefixedPath) !== 0) {

                continue;

            }
<?php             if (

                $location === $itemPath

                || ($deep && $location !== '' && strpos($itemPath, $location) !== 0)

                || ($deep === false && ! $this->isAtRootDirectory($location, $itemPath))

            ) {

                continue;