There is such a question. How to run a class from cli. The whole architecture works except for launching from the command line. I found this solution, but I can't figure it out
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);