PHPackages                             tarfin-labs/zbar-php - 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. tarfin-labs/zbar-php

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

tarfin-labs/zbar-php
====================

zbar-php is a php package that provides an interface to the zbar bar-code reading library.

2.0.0(9mo ago)2593.2k↑18.9%10[1 issues](https://github.com/tarfin-labs/zbar-php/issues)[2 PRs](https://github.com/tarfin-labs/zbar-php/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Mar 9Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/tarfin-labs/zbar-php)[ Packagist](https://packagist.org/packages/tarfin-labs/zbar-php)[ Docs](https://github.com/tarfin-labs/zbar-php)[ RSS](/packages/tarfin-labs-zbar-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (0)

zbar-php
========

[](#zbar-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b7d5c3943dc26152a5d7f95bebde688246de1a4e381b9441c3db863a805b782a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74617266696e2d6c6162732f7a6261722d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tarfin-labs/zbar-php)[![GitHub Workflow Status](https://camo.githubusercontent.com/c77dcdd447ae2b2c35d5d2f5977d927786f336eed3e1a5538418632a9fc46359/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f74617266696e2d6c6162732f7a6261722d7068702f74657374733f6c6162656c3d7465737473)](https://camo.githubusercontent.com/c77dcdd447ae2b2c35d5d2f5977d927786f336eed3e1a5538418632a9fc46359/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f74617266696e2d6c6162732f7a6261722d7068702f74657374733f6c6162656c3d7465737473)[![Quality Score](https://camo.githubusercontent.com/0c100a8cc8c3b6b5b90d078c4505984fb39db677586789bfa62d57628512cc80/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f74617266696e2d6c6162732f7a6261722d7068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tarfin-labs/zbar-php)[![Total Downloads](https://camo.githubusercontent.com/7ac4f3ae6e291616299880f85687331d796badb78db5c34e606c00da562cee2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74617266696e2d6c6162732f7a6261722d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tarfin-labs/zbar-php)

Introduction
------------

[](#introduction)

zbar-php is a php package that provides an interface to the zbar bar-code reading library.

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

[](#requirements)

You should have [zbar](http://zbar.sourceforge.net/) and [imagemagick](https://imagemagick.org/) installed.

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

[](#installation)

You can install the package via composer:

```
composer require tarfin-labs/zbar-php
```

Usage
-----

[](#usage)

Scanning bar-code or qr-code with zbar is simple.

```
$zbar = new \TarfinLabs\ZbarPhp\Zbar($imagePath);
$code = $zbar->scan();
```

Supported file formats: `pdf`, `jpeg`, `jpg`, `svg` and `gif`.

Here is how to get only the type of bar code.

```
$zbar = new \TarfinLabs\ZbarPhp\Zbar($imagePath);
$type = $zbar->type();

echo $type; // "EAN-13"
```

And this is how you get both.

```
$zbar = new \TarfinLabs\ZbarPhp\Zbar($imagePath);
$barCode = $zbar->decode();

echo $barCode->code(); // "1234567890128"
echo $barCode->type(); // "EAN-13"
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the tests as appropriate.

### Security

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Faruk Can](https://github.com/frkcn)
- [Yunus Emre Deligöz](https://github.com/deligoez)
- [Hakan Özdemir](https://github.com/hozdemir)
- [Turan Karatuğ](https://github.com/tkaratug)
- [All Contributors](../../contributors)

### License

[](#license)

zbar-php is open-sourced software licensed under the MIT license.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance75

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 52.6% 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

Every ~197 days

Recently: every ~217 days

Total

11

Last Release

284d ago

Major Versions

1.x-dev → 2.0.02025-08-08

PHP version history (6 changes)1.0.0PHP ^7.2

1.2.0PHP ^7.2 || ^8.0

1.3.0PHP ^7.2|^7.3|^7.4|^8.0|^8.1

1.6.0PHP ^7.2|^7.3|^7.4|^8.0|^8.1|^8.2

1.7.0PHP ^7.2|^7.3|^7.4|^8.0|^8.1|^8.2|^8.3

2.0.0PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5600fb42e402c85c4d893ac1f0375db5fa5989c0d605ada8a28f627153d244c?d=identicon)[frkcn](/maintainers/frkcn)

![](https://www.gravatar.com/avatar/e252316490c5fc7bae7eb25b6c0cb301b49fbc706c32896fea9467b64cf3653b?d=identicon)[Tarfin Labs](/maintainers/Tarfin%20Labs)

---

Top Contributors

[![frkcn](https://avatars.githubusercontent.com/u/374634?v=4)](https://github.com/frkcn "frkcn (30 commits)")[![khalyomede](https://avatars.githubusercontent.com/u/15908747?v=4)](https://github.com/khalyomede "khalyomede (10 commits)")[![tkaratug](https://avatars.githubusercontent.com/u/4394344?v=4)](https://github.com/tkaratug "tkaratug (9 commits)")[![aydinfatih](https://avatars.githubusercontent.com/u/14280894?v=4)](https://github.com/aydinfatih "aydinfatih (4 commits)")[![StanBarrows](https://avatars.githubusercontent.com/u/10268813?v=4)](https://github.com/StanBarrows "StanBarrows (3 commits)")[![TheLastPastor](https://avatars.githubusercontent.com/u/58549012?v=4)](https://github.com/TheLastPastor "TheLastPastor (1 commits)")

---

Tags

barcodephpqrcodezbarqr codetarfin-labsbar-codezbar-php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tarfin-labs-zbar-php/health.svg)

```
[![Health](https://phpackages.com/badges/tarfin-labs-zbar-php/health.svg)](https://phpackages.com/packages/tarfin-labs-zbar-php)
```

###  Alternatives

[chillerlan/php-qrcode

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

2.4k28.9M208](/packages/chillerlan-php-qrcode)[salla/zatca

A helper to generate the QR code and signed it for ZATCA e-invoicing

159416.7k2](/packages/salla-zatca)[tarfin-labs/laravel-spatial

Laravel package to work with geospatial data types and functions.

7285.9k](/packages/tarfin-labs-laravel-spatial)[zxing/qr-reader

PHP qr code reader library

7542.7k1](/packages/zxing-qr-reader)[ph-7/qrcode-generator-php-class

Light QRCode PHP class (library). QR Code Generator using vCard 4.0 and the Google Chart AP

10415.5k2](/packages/ph-7-qrcode-generator-php-class)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9510.3k](/packages/amirezaeb-heroqr)

PHPackages © 2026

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