PHP code example of loic-sharma / profiler
1. Go to this page and download the library: Download loic-sharma/profiler 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/ */
loic-sharma / profiler example snippets
Profiler::startTimer('testLogging');
// The profiler listens to Laravel's logger.
Log::info('Hello World!');
Log::notice('Some event occured.');
Profiler::endTimer('testLogging');
$logger = new Profiler\Logger\Logger;
$profiler = new Profiler\Profiler($logger);
$profiler->startTimer('testLogging');
$logger->debug($object);
$logger->info('Hello World!');
$logger->notice('Some event occurred.');
$logger->warning('Careful: some warning.');
$logger->error('Runtime error.');
$logger->critical('This needs to be fixed now!');
$logger->emergency('The website is down right now.');
$profiler->endTimer('testLogging');
echo $profiler;