cnwyt/helpers

PHP的常用帮助函数

0.1.1 2018-11-16 06:51 UTC

This package is auto-updated.

Last update: 2024-09-16 19:59:10 UTC


README

PHP的通用帮助函数库

安装

$ composer require cnwyt/helpers

composer.json

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/cnwyt/helpers"
    }
]

用法

$user = \Cnwyt\Helpers\get_user_agent();

$str = 'cnwyt@outlookcom';
$result = \Cnwyt\Helpers\is_valid_email($str);

测试

$ cd helpers/
$ ./vendor/bin/phpunit tests/HelperTest.php