Created
December 7, 2012 09:02
-
-
Save CHH/4231972 to your computer and use it in GitHub Desktop.
Silex for the CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app = new Application; | |
$app->match('greet [--yell] <name>', function($name, $options) { | |
$message = "Hello $name!"; | |
if (isset($options['yell'])) { | |
$message = strtoupper($message); | |
} | |
echo $message, "\n"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment