showResults($time_start); // echo "\n\n\n"; } // показывает некоторые показатели производительности protected function showResults($time_start) { $time_end = microtime(true); $execution_secs = ($time_end - $time_start); /* Currently used memory */ $mem_usage = memory_get_usage(); /* Peak memory usage */ $mem_peak = memory_get_peak_usage(); // Create a new Table instance. $table = new Table($this->output); // Set the table headers. $table->setHeaders([ 'Explantion', 'Value', '' ]); // Set the contents of the table. $table->setRows([ ['The script is now using ', '' . round($mem_usage / 1024 / 1024, 5) . '', ' MB'], ['Peak usage ', '' . round($mem_peak / 1024 / 1024, 5) . '', ' MB'], ['Total Execution Time:', '' . round($execution_secs, 5) . '', ' secs'] ]); // Render the table to the output. echo "\n"; $table->render(); } }