A Common Helper Function Library for 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