$qr = qr_encode ('test for qrcode');
if (is_resource ($qr))
qr_save ($qr, '1.png');
or you can output direct to stdout.
$qr = qr_encode ('test for qrcode');
if (is_resource ($qr))
{
header ("Content-type: image/PNG");
qr_save ($qr);
}
resource = qr_encode (string $text, [ int $version, int $mode, int $casesensitive]);
bool = qr_save (resource $qr, [ string $filename] );