PHP code example of devtoolboxuk / utilitybundle

1. Go to this page and download the library: Download devtoolboxuk/utilitybundle 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/ */

    

devtoolboxuk / utilitybundle example snippets


use devtoolboxuk\utilitybundle;

$this->utility = new UtilityService();

$memory = $this->utility->memory();

$memory->getMemUsage(); //Outputs the memory usage

$memory->getPeakMemUsage(); //Outputs the peak memory usage

$debug = $this->utility->debug();

$debug->initialise(); 
$debug->executionTime();

$debug = $this->utility->date();

$debug->convert(); //Returns the date time of now 
$debug->convert('2019-02-07T12:00:00'); //Returns 2019-02-07 12:00:00
sh
$ php -r "readfile('https://getcomposer.org/installer');" | php
sh
$ php composer.phar install