str_starts_with

Supported Versions: PHP 8
Checks if a string starts with a given substring
str_starts_with(string $haystackstring $needle): bool
    public function flush()

    {

        foreach (
$this->table as $key => $record) {

            if (
str_starts_with($key'interval-')) {

                continue;

            }
    public static function from($throwable)

    {

        
$fallbackTrace str_starts_with($throwable->getFile(), 'closure://')

            ? 
collect($throwable->getTrace())->whereNotNull('file')->first()

            : 
null;
    public static function throwable(Throwable $throwable)

    {

        
$fallbackTrace str_starts_with($throwable->getFile(), 'closure://')

            ? 
collect($throwable->getTrace())->whereNotNull('file')->first()

            : 
null;
            $swooleRequest->rawContent(),

        );



        if (
str_starts_with($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded') &&

            
in_array(strtoupper($request->server->get('REQUEST_METHOD''GET')), ['PUT''PATCH''DELETE'])) {

            
parse_str($request->getContent(), $data);
    {

        return 
$pathToFile &&

               ! 
in_array(pathinfo($pathToFilePATHINFO_EXTENSION), ['php''htaccess''config']) &&

               
str_starts_with($pathToFile$publicPath) &&

               
is_file($pathToFile);

    }