PHPackages                             fterenzani/lazypdo - 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. [Database &amp; ORM](/categories/database)
4. /
5. fterenzani/lazypdo

ActiveLibrary[Database &amp; ORM](/categories/database)

fterenzani/lazypdo
==================

Just a bit of sugar in PDO

4.0(9y ago)242LGPLPHPPHP &gt;=5.4

Since Jul 30Pushed 9y ago1 watchersCompare

[ Source](https://github.com/fterenzani/LazyPdo)[ Packagist](https://packagist.org/packages/fterenzani/lazypdo)[ Docs](https://github.com/fterenzani/LazyPdo)[ RSS](/packages/fterenzani-lazypdo/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

```
// Lazy database connection
$lazyPdo = new \LazyPdo\Lazy('sqlite:::memory:');

// Normal connection
$notLazyPdo = new \LazyPdo\Pdo('sqlite:::memory:');

// It is the equivalent of
// $pdo = new PDO('sqlite:::memory:');
// $pdo->setAttribute(\PDO::ATTR_ERRMODE , \PDO::ERRMODE_EXCEPTION);
// $pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_OBJ);

$lazyPdo instanceof \LazyPdo\LazyPdo; // true
$notLazyPdo instanceof \LazyPdo\LazyPdo; // true

$lazyPdo instanceof \PDO; // true
$notLazyPdo instanceof \PDO; // true

// Get the instance of \PDO
$pdo = $lazyPdo->getPdo();

// Shorthand method
$results = $lazyPdo->query($sql, array($vars, $to, $bind));

// It is the equivalent of:
// $stmt = $pdo->prepare($sql);
// $stmt->execute(array($vars, $to, $bind));
// $results = $stmt;

// Shorthand method
$affectedRows = $lazyPdo->exec($sql, array($vars, $to, $bind));

// It is the equivalent of:
// $stmt = $pdo->prepare($sql);
// $stmt->execute(array($vars, $to, $bind));
// $affectedRows = $stmt->rowCount();

$stmt = $lazyPdo->query($sql, array($vars, $to, $bind));

$stmt->fetchObjects('\My\CustomClass', array($constructor, $arguments));
// It is the equivalent of:
$stmt->fetchAll(\PDO::FETCH_CLASS, '\My\CustomClass', array($constructor, $arguments));

$stmt->fetchColumns(0);
// It is the equivalent of:
$stmt->fetchAll(\PDO::FETCH_COLUMN);

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~227 days

Total

5

Last Release

3397d ago

Major Versions

1.0.1 → 2.02015-07-15

2.0 → 3.02017-01-19

v2.x-dev → 4.02017-01-22

PHP version history (2 changes)1.0.1PHP &gt;=5.3

2.0PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d4fc036c54e34fbeff2a862e3f2b836f534b4df7748b81c660ff6bd262704bd?d=identicon)[fterenzani](/maintainers/fterenzani)

---

Top Contributors

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

---

Tags

databasepdodb

### Embed Badge

![Health badge](/badges/fterenzani-lazypdo/health.svg)

```
[![Health](https://phpackages.com/badges/fterenzani-lazypdo/health.svg)](https://phpackages.com/packages/fterenzani-lazypdo)
```

###  Alternatives

[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4572.9M34](/packages/aura-sqlquery)[envms/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

925511.7k13](/packages/envms-fluentpdo)[lichtner/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

921274.8k6](/packages/lichtner-fluentpdo)[fpdo/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

921244.9k7](/packages/fpdo-fluentpdo)[atlas/query

Object-oriented query builders and performers for MySQL, Postgres, SQLite, and SQLServer.

41249.0k7](/packages/atlas-query)[aura/sqlschema

Provides facilities to read table names and table columns from a database using PDO.

41234.1k4](/packages/aura-sqlschema)

PHPackages © 2026

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