Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return part of a string
substr(string $stringint $offset, ?int $length null): string
        $key $this->app['config']['app.key'];



        if (
str_starts_with($key'base64:')) {

            
$key base64_decode(substr($key7));

        }



        
$connection $config['connection'] ?? null;
        try {

            
$expire substr(

                
$contents $this->files->get($pathtrue), 010

            
);

        } catch (
Exception $e) {

            return 
$this->emptyPayload();

        }
        }



        try {

            
$data unserialize(substr($contents10));

        } catch (
Exception $e) {

            
$this->forget($key);
    public static function remove($cookieValue)

    {

        return 
substr($cookieValue41);

    }
        if (! is_null($columns)) {

            foreach (
$columns as $column) {

                if ((
$position stripos($column' as ')) !== false) {

                    
$as substr($column$position4);



                    [
$original$alias] = explode($as$column);
    protected function guessModelName($name)

    {

        if (
str_ends_with($name'Factory')) {

            
$name substr($name0, -7);

        }



        
$modelName $this->qualifyModel(Str::after($name$this->rootNamespace()));
        foreach ($this->eagerLoad as $name => $constraints) {

            if (
$this->isNestedUnder($relation$name)) {

                
$nested[substr($namestrlen($relation.'.'))] = $constraints;

            }

        }
            if (str_starts_with($key'pivot_')) {

                
$values[substr($key6)] = $value;



                unset(
$model->$key);

            }
        if (\is_string($val) && str_contains($val"\0")) {

            
$val \substr($val0, -1);

        }



        return 
$val;
    public function dynamicWhere($method$parameters)

    {

        
$finder substr($method5);



        
$segments preg_split(

            
'/(And|Or)(?=[A-Z])/'$finder, -1PREG_SPLIT_DELIM_CAPTURE
    {

        return 
array_map(function ($column) {

            return 
is_string($column) && ($aliasPosition stripos($column' as ')) !== false

                    
substr($column0$aliasPosition) : $column;

        }, 
$columns);

    }
        $offset $query instanceof JoinClause 6;



        return 
'('.substr($this->compileWheres($where['query']), $offset).')';

    }
    protected function compileNestedHavings($having)

    {

        return 
'('.substr($this->compileHavings($having['query']), 7).')';

    }
            return chmod($path$mode);

        }



        return 
substr(sprintf('%o'fileperms($path)), -4);

    }
        $replacements = [

            
str_replace('/''\\'dirname(str_replace('\\''/'$alias))),

            
class_basename($alias),

            
substr($aliasstrlen(static::$facadeNamespace)),

        ];



        return 
str_replace(