PHPackages                             zhangchunsheng/php-qrcode - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. zhangchunsheng/php-qrcode

ActiveLibrary

zhangchunsheng/php-qrcode
=========================

php qrcode is qrcode utils written in PHP.

v0.0.2(5y ago)05801Apache-2.0PHPPHP ^7.0 || ^8.0

Since Jul 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/zhangchunsheng/php-qrcode)[ Packagist](https://packagist.org/packages/zhangchunsheng/php-qrcode)[ Docs](https://github.com/zhangchunsheng/php-qrcode)[ RSS](/packages/zhangchunsheng-php-qrcode/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (1)

This is PHP 7+ only implementation of QR Code 2-D barcode generator.

Based on:

By Dominik Dzienia

I was looking for a QR implementation for the pChart fork and came across this one.
It was either refactor Dominik's or use Chillerlan's ()
This fork is not a drop in replacement.
My code is four times smaller and two times faster
(much much faster than the Chillerlan's implementation)

Usage:

```
Possible hints: "Numeric", "Alphanumeric", "Byte", "Kanji"

```

- Single line:

(new QRCode(\[

```
'level' => $error_correction_level,
'size' => $max_module_size,
'margin' => $white_frame_size

```

\]))-&gt;encode('[https://github.com/zhangchunsheng/php-qrcode')-&gt;toFile("example.QRcode.png](https://github.com/zhangchunsheng/php-qrcode')-%3EtoFile(%22example.QRcode.png)");

- Or:
    $QRCode = new QRCode(\['level' =&gt; "Q", 'size' =&gt; 10, 'margin' =&gt; 4\]);
    $QRCode-&gt;encode('', $hint);
- Dump the matrix:
    echo json\_encode($QRCode-&gt;toArray());
- Load a matrix:
    $QRCode-&gt;fromArray($matix);
- Dump base64 encoded PNG:
    $QRCode-&gt;toBase64();
- Create ASCII:
    $QRCode-&gt;toASCII();
- Output to file:
    $QRCode-&gt;toFile("example.QRcode.png");
    $QRCode-&gt;toFile("example.QRcode.svg");
    $QRCode-&gt;toFile("example.QRcode.jpg");
- Add HTTP headers:
    $QRCode-&gt;forWeb("PNG");
    $QRCode-&gt;forWeb("SVG");
    $QRCode-&gt;forWeb("JPG", $quality = 90);

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2118d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ed32b3e7f1a84b1624cf4587a3b8f722dc9e82bb2af6778d28a975da2942dde?d=identicon)[yiluxiangbei](/maintainers/yiluxiangbei)

---

Top Contributors

[![zhangchunsheng](https://avatars.githubusercontent.com/u/831839?v=4)](https://github.com/zhangchunsheng "zhangchunsheng (10 commits)")

---

Tags

dependencypackageautoload

### Embed Badge

![Health badge](/badges/zhangchunsheng-php-qrcode/health.svg)

```
[![Health](https://phpackages.com/badges/zhangchunsheng-php-qrcode/health.svg)](https://phpackages.com/packages/zhangchunsheng-php-qrcode)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.4k187.2M2.6k](/packages/composer-composer)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M282](/packages/nunomaduro-termwind)[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M62](/packages/jean85-pretty-package-versions)[php-di/invoker

Generic and extensible callable invoker

26857.8M56](/packages/php-di-invoker)[joshdifabio/composed

Easily parse your project's Composer configuration, and those of its dependencies, at runtime.

53273.0k7](/packages/joshdifabio-composed)[phundament/gii-template-collection

Gii Template Collection, Model and CRUD templates with Boostrap UI

521.4k](/packages/phundament-gii-template-collection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
