digitalkreativ/php-utilities

General PHP helper functions you can use in any PHP 5.6.4 or above project

v0.0.1 2017-10-28 15:41 UTC

This package is auto-updated.

Last update: 2025-04-05 19:31:19 UTC


README

General PHP functions you can use in any project. Things like strings, validation, ... .

Using this package in your project

Add the following to your composer.json file

{
    "require": {
        "digitalkreativ/php-utilities": "v0.0.1"
    }
}

Example usage

Checking if a specified email is valid.

use Digitalkreativ\Utilities\EmailUtils;

var_dump( EmailUtils::isEmail( 'email@example.org' );

Checking IP address version

use Digitalkreativ\Utilities\ValidationUtils;

var_dump( ValidationUtils::isIpV4( '10.10.100.1' ) );
var_dump( ValidationUtils::isIpV6( '10.10.100.1' ) );

Components used

See composer.json for latest and versions.

License

The MIT License (MIT). Please see License File for more information.