PhpSandbox\PHPSandbox::append PHP Méthode

append() public méthode

Append trusted code
public append ( string | callable $code )
$code string | callable String or callable of trusted $code to append to generated code
    public function append($code)
    {
        if (!$code) {
            return $this;
        }
        $code = $this->disassemble($code);
        if ($this->auto_whitelist_trusted_code) {
            $this->autoWhitelist($code, true);
        }
        $this->appended_code .= "\r\n" . substr($code, 6) . "\r\n";
        //remove opening php tag
        return $this;
    }
PHPSandbox