Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Aura\Sql\Profiler; use Aura\Sql\Exception; use Psr\Log\LoggerInterface; u..
Decoded Output download
<?php
namespace Aura\Sql\Profiler; use Aura\Sql\Exception; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; class Profiler implements ProfilerInterface { protected $context = array(); protected $logger; protected $active = false; protected $logLevel = LogLevel::DEBUG; protected $logFormat = "{function} ({duration} seconds): {statement} {backtrace}"; public function __construct(LoggerInterface $logger = null) { if ($logger === null) { $logger = new MemoryLogger(); } $this->logger = $logger; } public function setActive($active) { $this->active = (bool) $active; } public function isActive() { return $this->active; } public function getLogger() { return $this->logger; } public function getLogLevel() { return $this->logLevel; } public function setLogLevel($logLevel) { $this->logLevel = $logLevel; } public function getLogFormat() { return $this->logFormat; } public function setLogFormat($logFormat) { $this->logFormat = $logFormat; } public function start($function) { if (!$this->active) { return; } $this->context = array("function" => $function, "start" => microtime(true)); } public function finish($statement = null, array $values = array()) { if (!$this->active) { return; } $finish = microtime(true); $e = new Exception(); $this->context["finish"] = $finish; $this->context["duration"] = $finish - $this->context["start"]; $this->context["statement"] = $statement; $this->context["values"] = empty($values) ? '' : print_r($values, true); $this->context["backtrace"] = $e->getTraceAsString(); $this->logger->log($this->logLevel, $this->logFormat, $this->context); $this->context = array(); } } ?>
Did this file decode correctly?
Original Code
<?php
namespace Aura\Sql\Profiler; use Aura\Sql\Exception; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; class Profiler implements ProfilerInterface { protected $context = array(); protected $logger; protected $active = false; protected $logLevel = LogLevel::DEBUG; protected $logFormat = "\x7b\146\x75\x6e\143\x74\151\157\156\x7d\40\50\173\144\165\x72\x61\164\151\x6f\156\175\40\x73\x65\143\157\156\144\163\51\x3a\x20\x7b\163\x74\x61\164\145\x6d\145\x6e\164\x7d\x20\x7b\142\x61\x63\x6b\164\162\x61\143\x65\x7d"; public function __construct(LoggerInterface $logger = null) { if ($logger === null) { $logger = new MemoryLogger(); } $this->logger = $logger; } public function setActive($active) { $this->active = (bool) $active; } public function isActive() { return $this->active; } public function getLogger() { return $this->logger; } public function getLogLevel() { return $this->logLevel; } public function setLogLevel($logLevel) { $this->logLevel = $logLevel; } public function getLogFormat() { return $this->logFormat; } public function setLogFormat($logFormat) { $this->logFormat = $logFormat; } public function start($function) { if (!$this->active) { return; } $this->context = array("\x66\165\156\143\164\x69\x6f\x6e" => $function, "\x73\x74\x61\x72\164" => microtime(true)); } public function finish($statement = null, array $values = array()) { if (!$this->active) { return; } $finish = microtime(true); $e = new Exception(); $this->context["\146\x69\x6e\151\163\x68"] = $finish; $this->context["\x64\165\162\141\164\x69\x6f\156"] = $finish - $this->context["\x73\x74\x61\x72\x74"]; $this->context["\163\164\x61\164\145\x6d\145\156\x74"] = $statement; $this->context["\x76\141\154\165\145\x73"] = empty($values) ? '' : print_r($values, true); $this->context["\x62\x61\143\x6b\x74\162\x61\143\145"] = $e->getTraceAsString(); $this->logger->log($this->logLevel, $this->logFormat, $this->context); $this->context = array(); } }
Function Calls
None |
Stats
MD5 | 670dbb28862589db8e670dd0d7cbaba7 |
Eval Count | 0 |
Decode Time | 82 ms |