PHP code example of forever2077 / php-helper
1. Go to this page and download the library: Download forever2077/php-helper library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
forever2077 / php-helper example snippets
use Helpful\Helper;
// 冒泡排序
Helper::algorithm()::BubbleSort([1, 3, 2, 5, 4]);
// 获取内存使用情况
Helper::system()::getMemoryUsage();
// 获取当前日期时间
Helper::dateTime()::now()->toDateTimeString();
支持所有辅助类;
// 使用composer安装
composer global ser repo:ls
// 使用镜像源
composer repo:use tencent
文档 https://github.com/slince/composer-registry-manager/blob/master/README-zh_CN.md
注意 有个别项目在某些源已不更新,可切换回composer官方源即可解决