The value function returns the value it is given. However, if you pass a closure to the function, the closure will be executed and its returned value will be returned:
$result value(true);


$result value(function () {
    return 
false;
});
        if (is_null($value)) {

            
$this->event(new CacheMissed($key));



            
$value value($default);

        } else {

            
$this->event(new CacheHit($key$value));

        }
        if (is_null($value)) {

            
$this->event(new CacheMissed($key));



            return isset(
$keys[$key]) ? value($keys[$key]) : null;

        }
            return $value;

        }



        
$this->put($key$value $callback(), value($ttl));



        return 
$value;

    }
    {

        if (
is_null($callback)) {

            if (empty(
$array)) {

                return 
value($default);

            }



            foreach (
$array as $item) {
            }

        }



        return 
value($default);

    }
    public static function last($array, callable $callback null$default null)

    {

        if (
is_null($callback)) {

            return empty(
$array) ? value($default) : end($array);

        }



        return static::
first(array_reverse($arraytrue), $callback$default);
    public static function get($array$key$default null)

    {

        if (! static::
accessible($array)) {

            return 
value($default);

        }



        if (
is_null($key)) {
        }



        if (! 
str_contains($key'.')) {

            return 
$array[$key] ?? value($default);

        }



        foreach (
explode('.'$key) as $segment) {
            if (static::accessible($array) && static::exists($array$segment)) {

                
$array $array[$segment];

            } else {

                return 
value($default);

            }

        }
            return $this->items[$key];

        }



        return 
value($default);

    }
            return $this->items[$key];

        }



        
$this->offsetSet($key$value value($value));



        return 
$value;

    }
                if ($target instanceof Collection) {

                    
$target $target->all();

                } elseif (! 
is_iterable($target)) {

                    return 
value($default);

                }



                
$result = [];
            } elseif (is_object($target) && isset($target->{$segment})) {

                
$target $target->{$segment};

            } else {

                return 
value($default);

            }

        }
        if (is_null($callback)) {

            if (! 
$iterator->valid()) {

                return 
value($default);

            }



            return 
$iterator->current();
            }

        }



        return 
value($default);

    }