Usage inside the PHP code

Main analytic function

// Or inline.

analysis of an extbase query result

Forced logging

Force kreXX to write the analysis into a logfile:

// Force kreXX to write an analysis into a log file.
// Force kreXX to write a backtrace into a log file
// Force the timer output into a log file

Wen using the forced logging, the following things will happen:

  • Output destination is set to file by force.

  • Ajax requests will get logged by force.


\Krexx::timerMoment('get all rows');
$notixxes = $this->notixxRepository->findAll();
\Krexx::timerMoment('assign rows to view');
$this->view->assign('notixxes', $notixxes);

benchmarking result



kreXX backtrace

Exception handler

// register the exception handler
// call undefined function to cause an error
// unregister the exception handler

kreXX error handler

Scope analysis

Often enough a kreXX call will look like this:


Analysing $this means, that all protected and private values and methods are reachable from this point inside the code. When kreXX notices this, it will analyse all reachable variables and methods of this class.