setPrompt("test>"); // Create an anonymous context and add a command $ctx = $myShell->createContext("root"); $ctx->addCommand("hello", function () use ($myShell) { $myShell->getInput("What is your name?", function ($name) use ($myShell) { echo "Hello, {$name}\n"; $myShell->getInput("Who is your daddy and what does he do?", function ($daddy) { echo "{$daddy}? Oookay...\n"; }); }); }); // Run the shell $myShell->run();