PhpSandbox\PHPSandbox::__invoke PHP 메소드

__invoke() 공개 메소드

Besides the code or closure to be executed, you can also pass additional arguments that will overwrite the default values of their respective arguments defined in the code
public __invoke ( Closure | callable | string $code ) : mixed
$code Closure | callable | string The closure, callable or string of code to execute
리턴 mixed The output of the executed sandboxed code
    public function __invoke($code)
    {
        return call_user_func([$this, 'execute'], $code);
    }
PHPSandbox