PHP code example of moitran / php-common-funcs

1. Go to this page and download the library: Download moitran/php-common-funcs 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/ */

    

moitran / php-common-funcs example snippets



use MoiTran\CommonFunctions\DateCommonFunctions;

class A {
    public function doSomeThing() {
        $time = DateCommonFunctions::getCurrentTime('Y/m/d');
        // do some thing
    }
}

use MoiTran\CommonFunctions\DateCommonFunctions;
use MoiTran\CommonFunctions\StaticCalling;

class A {
    use StaticCalling;

    public function doSomeThing() {
        $time = $this->callStatic(DateCommonFunctions::class, DateCommonFunctions::GET_CURRENT_TIME_FUNC, ['Y/m/d']);
        // do some thing
    }
}
bash
$ composer