public function encode($intext, $outfile = false) { $code = new PHPQRcode(); if ($this->eightbit) { $code->encodeString8bit($intext, $this->version, $this->level); } else { $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); } QRtools::markTime('after_encode'); if ($outfile !== false) { file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); } else { return QRtools::binarize($code->data); } }