4 psi.directory={PWD}:{PWD}/../../psi.d
7 extension_loaded("psi") or die("skip - need ext/psi");
8 PHP_OS === "Linux" or die("skip - only for Linux");
9 function_exists("psi\\getopt") or die("skip - need psi\\getopt()");
18 "progname", "huh", "-v", "-x", 1, "-s", "foo", "--", "-gotcha", "--bar", "baz"
23 for ($i = 0; $i<3; ++$i) {
27 while (($opt = chr(psi\getopt($args, $opts)))) {
34 printf("got %s: %s\n", $opt, psi\optarg());
37 printf("error '%s'\n", $opt);
43 $pos = psi\optind\get();
44 while ($pos < count($args)) {
45 printf("arg: %s\n", $args[$pos++]);