Library of several utilities for PHP applications

0.1.2 2016-10-12 10:46 UTC


Library of several utilities for PHP applications.


composer require cybtow/utils "^0.1"

CtrlTime library

use Cybtow\Utils\CtrlTime;

$CtrlTime = new CtrlTime();
// code here
echo $CtrlTime->time(); //show time between here and start.

FileSystem library

  • mkdir: Create a directory.
  • rrmdir: Delete a tree directory recursively.

GMTDateTime library

This class extends from PHP \DateTime.

Less library

This class is a wrapper for oyejorge/less.php library (

use Cybtow\Utils\Less;

$Less = new Less();
$in = 'main.less';
$out = 'main.css';

$Less->options['cache_dir'] = './cacheless';
$Less->variables['my_color'] = '#ffaabb';
$Less->parseFile($in, '', array(), $out);

Utils library

  • slug: Create a valid string for urls
  • getUniqId: Return a unique random id
  • echoVarDump: Prints a var dump and exits (optionaly)