Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Commander
- {
- function __construct(array $option)
- {
- switch (key($option)){
- case "one":
- echo "one";
- break;
- case "two":
- echo "two";
- break;
- case "help"||"h":
- default:
- echo 'Help';
- }}
- }
- $option=getopt("o:t:h",["one:","two:","help:"]);
- new Commander($option);
Add Comment
Please, Sign In to add comment