summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/getopt.phpt
blob: 13a4fa558f39f1296b068bb48652cb9a50e41155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
getopt
--ARGS--
-v -h -d test -m 1234 -t -j
--SKIPIF--
<?php
	if (substr(PHP_OS, 0, 3) == 'WIN') {
		die('skip getopt() is currently not available on Windows');
	}
	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)
}