File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -282,9 +282,15 @@ Return `true` if key exists, otherwise the method returns `false`
282282If ` $checkAlias ` is ` true ` , then the method will check key and alias, and will return ` true ` if key or alias exists.
283283If ` $checkAlias ` is ` false ` , then the method will check only key and will return ` true ` only if key exists.
284284``` php
285- echo $CliArgs->isFlagExist('f'); // false
285+ // some_script.php --foo
286+
287+ $CliArgs = new $CliArgs(['foo' => 'f']);
288+
286289echo $CliArgs->isFlagExist('foo'); // true
287- echo $CliArgs->isFlagExist('foo', 'f'); // true
290+ echo $CliArgs->isFlagExist('f'); // true
291+
292+ echo $CliArgs->isFlagExist('foo', false); // true
293+ echo $CliArgs->isFlagExist('f', false); // false
288294```
289295
290296##### getArguments(): array
You can’t perform that action at this time.
0 commit comments