---
title: "Flags"
description: "Options that take no value."
version: "3.0"
---

> Documentation Index
> Fetch the complete documentation index at: https://cop.phalcon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Flags

An option uses the next token as its value when that token does not start with `-`. A flag is an option
that takes no value. Give the flag names, without dashes, in the second parameter of `parse()`. The flags
apply only to that call.

```php
// php test.php --dev build
$parser->parse($argv);          // ['dev' => 'build']
$parser->parse($argv, ['dev']); // ['dev' => true, 0 => 'build']

// php test.php -vo out.txt
$parser->parse($argv);          // ['v' => 'out.txt', 'o' => 'out.txt']
$parser->parse($argv, ['v']);   // ['v' => true, 'o' => 'out.txt']
```

An option with an equal sign keeps its value, also when it is a flag: `--dev=yes` gives `['dev' => 'yes']`.

Source: https://cop.phalcon.io/3.0/flags/index.mdx
