PHPackages                             jacob-roth/php-helpers - 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. jacob-roth/php-helpers

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

jacob-roth/php-helpers
======================

An assortment of PHP scripts and classes that aid in the development of PHP projects

v2.1.0(3y ago)2441MITPHPPHP ^7.4|^8.0

Since Sep 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/JacobRothDevelopment/PhpHelpers)[ Packagist](https://packagist.org/packages/jacob-roth/php-helpers)[ Docs](https://github.com/JacobRothDevelopment/PhpHelpers)[ RSS](/packages/jacob-roth-php-helpers/feed)WikiDiscussions main Synced 1mo ago

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

PhpHelpers
==========

[](#phphelpers)

A library of PHP scripts and classes that aid in the development of PHP projects

All scripts are written for PHP 7.4 | 8.\*

---

List of Helpers
---------------

[](#list-of-helpers)

- `UpdateSqlClasses.php`

    - These scripts are used to create php classes representing your database tables
    - Choose a script from `UpdateSqlClasses/` based on which sql implementation you're using

        - Supported Implementations

            - MySQL: `/UpdateSqlClasses/mysql/UpdateSqlClasses.php`
            - SQLite: `/UpdateSqlClasses/sqlite/UpdateSqlClasses.php`
    - See the top section of the script to configure the script's parameters
    - Tun from the root directory of project

        ```
        php UpdateSqlClasses.php
        ```
- `PdoWrapper.php`

    - I wrote this class because I hated copying and pasting the same PDO query &amp; execution code and only needing to change the sql query
    - Initialize the object with your PDO instance, then use this class instead of your PDO
    - SqlExecution is the method you'll use the most (usage examples here)

        ```
        $PdoWrapperInstance->SqlExecution($sql, $vars, [PDO::FETCH_CLASS, User::class], "fetch");

        $PdoWrapperInstance->SqlExecution($sql, [], [PDO::FETCH_COLUMN, 0], "fetchAll");
        ```
    - Each `SqlExecution()` tries to begin a transaction if one hasn't already been opened. Because of this, you'll need to run `SaveChanges()` to commit that transaction when you insert into of update your tables

        ```
        $PdoWrapperInstance->SaveChanges();
        ```
- `Logger.php`

    - This class helps create a custom log file.
    - Use like

        ```
        $logger = new Logger("path/to/file.log");
        $logger->log("hello world!");
        $logger->log("hello world!", LogLevel::Warn);
        ```

        outputs

        ```
        [ 2021-09-25 07:18:52 ] [ INFO ] hello world!
        [ 2021-09-25 07:18:40 ] [ WARN ] hello world!

        ```
- `Util.php`

    - `DebugPrint()`

        - A wrapper around `print_r()` that will output data to the browser in a readable format
        - Optional string title and stringifies a given value of any type
        - Use like

        ```
        \PhpHelpers\Util::DebugPrint($dataToOutput, "A Label To Describe Data");
        ```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~60 days

Recently: every ~39 days

Total

8

Last Release

1270d ago

Major Versions

v1.2.2 → v2.0.02022-06-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/53883026?v=4)[JacobRothDevelopment](/maintainers/JacobRothDevelopment)[@JacobRothDevelopment](https://github.com/JacobRothDevelopment)

---

Top Contributors

[![JacobRothDevelopment](https://avatars.githubusercontent.com/u/53883026?v=4)](https://github.com/JacobRothDevelopment "JacobRothDevelopment (30 commits)")[![jacobRedHawk](https://avatars.githubusercontent.com/u/66629427?v=4)](https://github.com/jacobRedHawk "jacobRedHawk (5 commits)")

---

Tags

logginghelperdatabase

### Embed Badge

![Health badge](/badges/jacob-roth-php-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/jacob-roth-php-helpers/health.svg)](https://phpackages.com/packages/jacob-roth-php-helpers)
```

###  Alternatives

[wazaari/monolog-mysql

A handler for Monolog that sends messages to MySQL

140884.1k6](/packages/wazaari-monolog-mysql)[dereuromark/cakephp-databaselog

A CakePHP plugin for storing and viewing application logs in the database

44165.0k2](/packages/dereuromark-cakephp-databaselog)[mg-code/yii2-helpers

A collection of useful helper classes for Yii framework 2.0

2022.5k5](/packages/mg-code-yii2-helpers)

PHPackages © 2026

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