diff options
-rw-r--r-- | ext/standard/tests/general_functions/getopt.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/getopt.phpt b/ext/standard/tests/general_functions/getopt.phpt new file mode 100644 index 0000000000..11ba702488 --- /dev/null +++ b/ext/standard/tests/general_functions/getopt.phpt @@ -0,0 +1,27 @@ +--TEST-- +getopt +--ARGS-- +-v -h -d test -m 1234 -t -j +--SKIPIF-- +<?php + if (!ini_get('register_argc_argv')) { + die("skip this test needs register_argc_argv to be enabled"); + } +?> +--FILE-- +<?php + var_dump(getopt("d:m:j:vht")); +?> +--EXPECT-- +array(5) { + ["v"]=> + bool(false) + ["h"]=> + bool(false) + ["d"]=> + string(4) "test" + ["m"]=> + string(4) "1234" + ["t"]=> + bool(false) +} |