use Symfony\Component\Console\Output\OutputInterface; $output = new OutputInterface(); $output->writeln('Hello, world!');
use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Output\OutputInterface; $output = new OutputInterface(); $progress = new ProgressBar($output, 10); for ($i = 0; $i < 10; ++$i) { $progress->advance(); sleep(1); } $progress->finish();
use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Output\OutputInterface; $output = new OutputInterface(); $table = new Table($output); $table->setHeaders(['Name', 'Email']); $table->setRows([ ['John Doe', 'john.doe@example.com'], ['Jane Smith', 'jane.smith@example.com'], ]); $table->render();All of these examples use the Symfony Console component, which is part of the Symfony framework.