composer require reinvanoyen/oak-console-table
<?php
$table = new \Tnt\ConsoleTable\Table($output); // $output = OutputInterface
$table->setHeaders(['Id', 'Username', 'Email address',]);
$table->setRows([
[1, 'Rein', '[email protected]',],
[2, 'JohnDoe21', '[email protected]',],
[3, 'butterfly1982', '[email protected]',],
]);
$table->addRow([4, 'user45', '[email protected]',]);
$table->output();