PHPackages                             globus-studio/phpqrcode - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. globus-studio/phpqrcode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

globus-studio/phpqrcode
=======================

Zero-dependency QR Code generator for PHP 7.4-9.0. Dead simple API, full spec compliance, 100% test coverage.

v1.0.0(1mo ago)4392—0%6MITPHPPHP &gt;=7.4 &lt;10.0CI passing

Since Jun 15Pushed 1mo ago34 watchersCompare

[ Source](https://github.com/MADEVAL/phpQRcode)[ Packagist](https://packagist.org/packages/globus-studio/phpqrcode)[ RSS](/packages/globus-studio-phpqrcode/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

phpQRcode
=========

[](#phpqrcode)

Zero-dependency QR Code generator for PHP 7.4–9.0.

[![CI](https://github.com/MADEVAL/phpQRcode/actions/workflows/ci.yml/badge.svg)](https://github.com/MADEVAL/phpQRcode/actions)[![PHP](https://camo.githubusercontent.com/1c22a094112ff85614d4f4d0c1ae075a18785eb3ae0002137ec17c7cf8733bd7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e34253230253743253230382e78253230253743253230392e302d383839324246)](https://github.com/MADEVAL/phpQRcode)[![License](https://camo.githubusercontent.com/d74388e36c317d347b4a1fdbed0fec9823c8f4ed2c393233abb26b3838bca674/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4d41444556414c2f7068705152636f6465)](LICENSE)

Features
--------

[](#features)

- Dead simple API - one line to generate QR
- Zero runtime dependencies
- PHP 7.4 / 8.0 / 8.1 / 8.2 / 8.3 / 8.4 / 8.5 / 9.0
- QR Code versions 1–40, all error correction levels
- Multiple output formats: SVG, PNG, HTML, ASCII, raw matrix
- ~100% test coverage (186 tests, 2209 assertions)
- PHPStan level max, zero errors
- 17x faster with fixed mask pattern
- PSR-4 autoloading

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- ext-gd (optional, only for PNG rendering)

Installation
------------

[](#installation)

```
composer require globus-studio/phpqrcode
```

Usage
-----

[](#usage)

```
use GlobusStudio\QRCode\QRCode;

// SVG string
$svg = QRCode::svg('https://example.com');

// PNG as data URI (requires ext-gd)
$png = QRCode::png('https://example.com');

// HTML table
$html = QRCode::html('https://example.com');

// ASCII art
echo QRCode::string('https://example.com');

// Raw boolean matrix
$matrix = QRCode::matrix('https://example.com');
```

Options
-------

[](#options)

```
use GlobusStudio\QRCode\QRCode;
use GlobusStudio\QRCode\ErrorCorrection\ErrorCorrectionLevel;

$svg = QRCode::svg('data', [
    'level' => ErrorCorrectionLevel::H,
    'size' => 4,
    'margin' => 2,
    'mask' => 3,            // fixed mask 0-7 (skips auto-selection, 17x faster)
    'foreground' => '#000000',
    'background' => '#ffffff',
]);
```

Performance
-----------

[](#performance)

By default the encoder tests all 8 mask patterns to find the optimal one. For batch generation or when speed matters, pass a fixed `mask` (0–7):

```
// ~180ms per QR (auto mask selection)
$svg = QRCode::svg($data);

// ~11ms per QR (fixed mask, 17x faster)
$svg = QRCode::svg($data, ['mask' => 0]);
```

Object API
----------

[](#object-api)

```
use GlobusStudio\QRCode\QRCode;
use GlobusStudio\QRCode\ErrorCorrection\ErrorCorrectionLevel;
use GlobusStudio\QRCode\Renderer\SvgRenderer;

$qr = new QRCode('https://example.com', ErrorCorrectionLevel::H);
$svg = $qr->render(new SvgRenderer(['size' => 6]));
$matrix = $qr->getMatrix();
```

Error Correction Levels
-----------------------

[](#error-correction-levels)

LevelRecoveryL~7%M~15%Q~25%H~30%Renderers
---------

[](#renderers)

RendererDependenciesOutputSvgRenderernoneSVG XML stringHtmlRenderernoneHTML tableStringRenderernoneASCII/UTF-8PngRendererext-gdPNG binaryRawRenderernoneJSON / int\[\]\[\]Credits
-------

[](#credits)

Inspired by the original [QRCode for PHP](http://www.d-project.com/) by **Kazuhiko Arase** (2009). Rewritten from scratch with modern PHP practices, strict typing, full test coverage, and zero deprecations.

License
-------

[](#license)

MIT - see [LICENSE](LICENSE).

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance90

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity51

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

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/285d32ac89643c66426e75f97a13c5eee2d8e8b809efd2d6fdde4665837b7b63?d=identicon)[Yevhen Leonidov](/maintainers/Yevhen%20Leonidov)

---

Top Contributors

[![MADEVAL](https://avatars.githubusercontent.com/u/10908537?v=4)](https://github.com/MADEVAL "MADEVAL (8 commits)")

---

Tags

barcodegeneratorphp74php80php81php82php83php84php85php9qrqr-codeqrcodeqrcode-generatorzero-dependenciesphpqr codeqrcodeqrgeneratorbarcode

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/globus-studio-phpqrcode/health.svg)

```
[![Health](https://phpackages.com/badges/globus-studio-phpqrcode/health.svg)](https://phpackages.com/packages/globus-studio-phpqrcode)
```

###  Alternatives

[chillerlan/php-qrcode

A QR Code generator and reader with a user-friendly API. PHP 8.4+

2.4k36.7M305](/packages/chillerlan-php-qrcode)[tuncaybahadir/quar

A simple QR Code generation tool for your projects with Laravel 10, 11, 12, 13 versions, php 8.2, 8.3, 8.4 and 8.5

80116.7k6](/packages/tuncaybahadir-quar)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9913.9k](/packages/amirezaeb-heroqr)[marcelorodrigo/filament-barcode-scanner-field

A camera-based barcode and QR code scanner input field for Filament forms. Features a modal interface with real-time scanning.

127.4k](/packages/marcelorodrigo-filament-barcode-scanner-field)

PHPackages © 2026

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