Skip to content

Darknetzz/php-utils

Repository files navigation

php-utils

General-purpose PHP utility classes. Requires PHP 8.0+.

# ────────────────────────────────────────────────────────── #
#                                                            #
#    $$\   $$\ $$$$$$$$\ $$$$$$\ $$\       $$$$$$\           #
#    $$ |  $$ |\__$$  __|\_$$  _|$$ |     $$  __$$\          #
#    $$ |  $$ |   $$ |     $$ |  $$ |     $$ /  \__|         #
#    $$ |  $$ |   $$ |     $$ |  $$ |     \$$$$$$\           #
#    $$ |  $$ |   $$ |     $$ |  $$ |      \____$$\          #
#    $$ |  $$ |   $$ |     $$ |  $$ |     $$\   $$ |         #
#    \$$$$$$  |   $$ |   $$$$$$\ $$$$$$$$\\$$$$$$  |         #
#     \______/    \__|   \______|\________|\______/          #
#                                                            #
# ────────────────────────────────────────────────────────── #
# ----[    General but useful PHP utilities. ]-------------  #
# ----[    Made with ❤️ by darknetzz         ]-------------  #
# ----[    https://github.com/Darknetzz/     ]-------------  #
# ────────────────────────────────────────────────────────── #

This library includes a bunch of useful tools for PHP. I wrote this because I kept re-inventing the wheel every time I started a new PHP project. There are other more complete alternatives out there (like Laravel), this was just made for fun and to learn.

Get started

Simply open your PHP project and clone this repo.

git clone git@github.com:Darknetzz/php-utils.git

Then include the library. You can use Composer autoload (recommended) or _All.php:

Using Composer (recommended):

composer require darknetzz/php-utils
require_once __DIR__ . '/vendor/autoload.php';

use PHPUtils\Crypto;
$crypto = new Crypto();
$hashedPassword = $crypto->hash("MyPassword123");

Using _All.php (e.g. when cloned as a subfolder):

include_once("php-utils/PHPUtils/_All.php");  // adjust path if your folder name differs

use PHPUtils\Crypto;
$crypto = new Crypto();
$hashedPassword = $crypto->hash("MyPassword123");

Modules

API documentation is generated in the Docs/ folder. Class reference:

Changelog

See CHANGELOG.md for recent improvements (strict types, exception-based error handling, new tests, CI).

Development

  • Tests: composer install && vendor/bin/phpunit
  • CI: GitHub Actions run PHPUnit on PHP 8.0–8.4 (see .github/workflows/php.yml).

About

A set of tools to simplify PHP development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages