Giter Site home page Giter Site logo

php-tools's Introduction

php-tools

ENGLISH | δΈ­ζ–‡

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

php tools

Structure

src/
tests/

Install

Via Composer

$ composer require yiranzai/tools

Usage

More please check the user manual

abstract

  • Arr::class
    • \Yiranzai\Tools\Arr::sortBy() // Sorts the array with the given callback and retains the original key, support multi-column sorting.
    • \Yiranzai\Tools\Arr::arrSortByField() // dyadic array sorting
    • \Yiranzai\Tools\Arr::arrGroup() // Arrays are grouped by field
    • \Yiranzai\Tools\Arr::heapSort() // Heap Sort
    • \Yiranzai\Tools\Arr::mergeSort() // Merge Sort
    • \Yiranzai\Tools\Arr::quickSort() // Quick Sort
  • Date::class
    • \Yiranzai\Tools\Date::toCarbon() // Generate a Carbon object
    • \Yiranzai\Tools\Date::timeDiffFormat() // Output the gap between two DateTime objects
  • Math::class
    • \Yiranzai\Tools\Math::formatDiv() // rounding format division
    • \Yiranzai\Tools\Math::formatMod() // rounded out formatted remainder (modulo operation)
    • \Yiranzai\Tools\Math::formatMul() // rounding format multiplication
    • \Yiranzai\Tools\Math::formatSub() // rounding format subtraction
    • \Yiranzai\Tools\Math::formatAdd() // rounding up formatting addition
    • \Yiranzai\Tools\Math::gcd() // Find the greatest common divisor of two numbers
    • \Yiranzai\Tools\Math::gcdArray() // Find the greatest common divisor of an array
  • Filesystem::class
    • \Yiranzai\Tools\Filesystem::put() // Store contents in the file.
    • \Yiranzai\Tools\Filesystem::get() // Get the contents of a file.
  • Tools::class
    • \Yiranzai\Tools\Tools::getNiceFileSize() // Humanized conversion memory information
    • \Yiranzai\Tools\Tools::callFunc() // Method of calling the object
    • \Yiranzai\Tools\Tools::iteratorGet() // Get an object or an array of elements
    • \Yiranzai\Tools\Tools::arrGet() // Get an element in the array
    • \Yiranzai\Tools\Tools::objectGet() // Get an element from the object
  • SnowFlake::class
    • \Yiranzai\SnowFlake\SnowFlake::next() // generate 64 bit identifier
    • \Yiranzai\SnowFlake\SnowFlake::analysis() // analysis 64 bit identifier
  • Zval::class
    • Zval::isRef() // Determine if two variables have a reference relationship

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

php-tools's People

Contributors

yiranzai avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.