Download the PHP package moitran/php-common-funcs without Composer
On this page you can find all versions of the php package moitran/php-common-funcs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download moitran/php-common-funcs
More information about moitran/php-common-funcs
Files in moitran/php-common-funcs
Download moitran/php-common-funcs
More information about moitran/php-common-funcs
Files in moitran/php-common-funcs
Vendor moitran
Package php-common-funcs
Short Description Writing useful common function in php
License MIT
Package php-common-funcs
Short Description Writing useful common function in php
License MIT
Please rate this library. Is it a good library?
Informations about the package php-common-funcs
php-common-funs
Writing useful common functions in php
Installation
What does it have?
-
Array
- groupItemsByKeys Group items in multidimensional array by values of list keys argument.
- isAssocArray Checking array input is assoc array or not List types of array.
- isNumericArray Checking array input is numeric array or not List types of array.
- convertLowerUpperCase Convert all string values in array to lower case or upper case.
- sortBy Sorting multidimensional array by list keys.
-
DateTime
- getCurrentTime Get current time with format argument
- getNow Return current Unix timestamp
- format Receive an date string argument and return in the specified format.
- getListRangeDate Return list dates between two dates in the specified format.
- getPreviousDates Return previous date in the specified format with argument is number of previous date.
- getPreviousDateRange Return list previous range dates opposite with date range argument.
- getTimeBetweenTwoDate Return number of Seconds (S), Minutes (M), Hours (H) or Days (D) between two dates.
- getAge Return age by date of birth.
- niceTime Return nice time format.
Best practice to use (*IMO)
All functions in this package have static method so that if we call functions redirect like this way. It will be so hard to write the phpunit test code.
The solution for it is using this trait StaticCalling to call those static functions. The code will be like this one
License
This package is under MIT License
All versions of php-common-funcs with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.0
The package moitran/php-common-funcs contains the following files
Loading the files please wait ....