Skip to content

Commit

Permalink
Add examples/cli-symfony.php
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Feb 15, 2023
1 parent b66baf3 commit 7d485dd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/cli-symfony.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env pogo
<?php
#!require symfony/console: ~4.4

$io = new Symfony\Component\Console\Style\SymfonyStyle(
new Symfony\Component\Console\Input\ArgvInput($argv),
new Symfony\Component\Console\Output\ConsoleOutput()
);

$io->section('Lunch');
if ($io->confirm('Make a grilled cheese sandwich?')) {
$io->writeln('We will need <comment>cheddar</comment> and <comment>bread</comment>');
}
else {
$io->writeln('Too bad!');
}

0 comments on commit 7d485dd

Please sign in to comment.