Functionality.php (beta)
✍️
About - This Is A Php Library To Make Your Work Easier/Faster,
You Can See Functionalty.php Website From Here - Project Created In 15 / 6 / 2022
📦
Installation - Using Composer
composer require functionality-library/functionality.php
- Now You Can Use Functionality.php Library In Your Project
- Example
require_once 'vendor/autoload.php'; use Functionality\FunctionalityPhp\Functionality; echo Functionality::randomColor(); // Random Color
📚
Usage - Randoms functions
Functionality::randomColor()
- Generate Random ColorFunctionality::randomBoolean()
- Generate Random BooleanFunctionality::randomNumber()
- Generate Random NumberFunctionality::randomString()
- Generate Random StringFunctionality::randomHsl()
- Generate Random Hsl ColorFunctionality::randomHexColor()
- Generate Random Hex Color
- Numbers functions
Functionality::getAvg(float $a, float $b)
- Get Average butween two numbersFunctionality::isEven(float $number)
- Check If Number Is EvenFunctionality::isOdd(float $number)
- Check If Number Is OddFunctionality::isPrime(int $number)
- Check If Number Is PrimeFunctionality::reverseNumber(float $number)
- Reverse a number (e.g. 12345 -> 54321)
- Strings functions
Functionality::isPalindrome(string $string)
- Check If String Is PalindromeFunctionality::capitalize(string $string)
- Capitalize First Letter Of Words In StringFunctionality::reverseString(string $string)
- Reverse a string (e.g. abcdef -> fedcba)
- Arrays functions
Functionality::filter(array $array, callable $callable)
- Filter Array By CallableFunctionality::getFactors(int $number)
- Get Factors Of NumberFunctionality::maxArray(array $array)
- Get Max Value Of ArrayFunctionality::minArray(array $array)
- Get Min Value Of ArrayFunctionality::sumArray(array $array)
- Get Sum Of ArrayFunctionality::randomElementFromArray(array $array)
- Get Random Element From ArrayFunctionality::removeDuplicatesFromArray(array $array)
- Remove Duplicates From ArrayFunctionality::shuffle(array $array)
- Sort Array Randomly
☕
To Get Started Contributing -
First Clone The Repository
git clone https://github.com/functionality-library/functionality.php.git
-
Then Install Packages
composer install
-
Run Tests using
phpunit
composer run-script test
-
Feel Free To Add What You Want!
-
If there is any issue, please open an issue on GitHub
-
If you have any suggestion, please open an issue on GitHub
-
If you have any question, please open an issue on GitHub