Dispatcher::stripNonPrintables PHP Method

stripNonPrintables() protected method

Remove control characters from the input.
protected stripNonPrintables ( $val ) : string | array
return string | array
    protected function stripNonPrintables($val)
    {
        if (is_array($val)) {
            foreach ($val as $k => $v) {
                $val[$k] = $this->stripNonPrintables($v);
            }
            return $val;
        } else {
            return preg_replace('/[[:cntrl:]]/', '', $val);
        }
    }