# extractPhpControlFlow

**Kind:** Function

**Source:** [`atloria-monorepo/libs/parser-core/src/parsers/backend/php-control-flow.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/parsers/backend/php-control-flow.ts#L414)

Read the guards and catches out of a span of PHP.

`startLine`/`endLine` are 1-based and inclusive, and bound which constructs are collected — the
whole file is still masked, because a heredoc or a comment opened above the span decides what
the text inside it means.

## Signature

```ts
function extractPhpControlFlow(source: string, startLine: number, endLine: number): ControlFlow
```

## Parameters

| Name | Type |
|---|---|
| `source` | `string` |
| `startLine` | `number` |
| `endLine` | `number` |

**Returns:** `ControlFlow`
