for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Functions for printing text.
*
* @author Adam "Saibamen" Stachowicz <[email protected]>
*/
namespace Text;
* Prints how much time took some action in milliseconds.
* @param float $startTime Time when action started
function printEndTime($startTime)
{
$endTime = microtime(true) - (float) $startTime;
$endTime = number_format((float) $endTime, 4, '.', '');
message('It was done in '.$endTime.' ms.');
}
* Execute message() function if DEBUG is set to true.
* @global bool $DEBUG
* @param mixed $message Message to print if in DEBUG mode
* @see \Text\message()
function debug($message)
if (DEBUG) {
Text\DEBUG
message($message);
* Prints message with new lines.
* @param mixed $message Message to print
function message($message)
echo "\n".$message."\n";