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.1.0(2mo ago)26102.3k↓43.4%10[1 issues](https://github.com/tarfin-labs/zbar-php/issues)[1 PRs](https://github.com/tarfin-labs/zbar-php/pulls)MITPHPPHP ^8.2|^8.3|^8.4|^8.5CI failing

Since Mar 9Pushed 2mo 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 3d ago

READMEChangelog (10)Dependencies (4)Versions (18)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

61

—

FairBetter than 98% of packages

Maintenance82

Actively maintained with recent releases

Popularity43

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~202 days

Recently: every ~266 days

Total

12

Last Release

87d ago

Major Versions

1.x-dev → 2.0.02025-08-08

PHP version history (7 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

2.1.0PHP ^8.2|^8.3|^8.4|^8.5

### 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)")[![tkaratug](https://avatars.githubusercontent.com/u/4394344?v=4)](https://github.com/tkaratug "tkaratug (13 commits)")[![khalyomede](https://avatars.githubusercontent.com/u/15908747?v=4)](https://github.com/khalyomede "khalyomede (10 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

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.3k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)[illuminate/process

The Illuminate Process package.

44869.2k99](/packages/illuminate-process)

PHPackages © 2026

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