2002-12-11 17:38:28 +00:00
|
|
|
--TEST--
|
|
|
|
getopt
|
|
|
|
--ARGS--
|
|
|
|
-v -h -d test -m 1234 -t -j
|
2003-06-30 18:22:53 +00:00
|
|
|
--INI--
|
|
|
|
register_argc_argv=On
|
|
|
|
variables_order=GPS
|
2002-12-11 17:38:28 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
2003-02-09 13:23:50 +00:00
|
|
|
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
|
|
|
die('skip getopt() is currently not available on Windows');
|
|
|
|
}
|
2002-12-11 17:38:28 +00:00
|
|
|
?>
|
|
|
|
--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)
|
|
|
|
}
|
2005-08-15 14:37:55 +00:00
|
|
|
--UEXPECT--
|
|
|
|
array(5) {
|
|
|
|
[u"v"]=>
|
|
|
|
bool(false)
|
|
|
|
[u"h"]=>
|
|
|
|
bool(false)
|
|
|
|
[u"d"]=>
|
|
|
|
unicode(4) "test"
|
|
|
|
[u"m"]=>
|
|
|
|
unicode(4) "1234"
|
|
|
|
[u"t"]=>
|
|
|
|
bool(false)
|
|
|
|
}
|