---
title: "Function"
description: "Static function related functions."
canonical_url: "https://www.zeyos.com/zymba/ref/function"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/function.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# Function

## Function

```
object @Function() {
	call(function $function, ?object $bind, ...$arguments): mixed {}
	countParameters(function $function): int {}
	isInternal(function $function): bool {}
	isUserDefined(function $function): bool {}
	isVariadic(function $function): bool {}
	listParameterNames(function $function): object {}
	listParameters(function $function): object {}
}
```

**Static function related functions.**

## Functions


### `@Function.call()`


Calls a function with variadic arguments, optionally bound as a method to a specific object.

```code
@Function.call(function $function, ?object $bind, variadic $arguments): mixed
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| function | `function`  |  | null |
| bind | `?object`  |  | null |
| arguments | `variadic`  |  | ... |

##### Returns

| Type | Value |
| --- | ---  |
| `mixed` |  |




### `@Function.countParameters()`


Counts the total number of parameters of a function.

```code
@Function.countParameters(function $function): int
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| function | `function`  |  | null |

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `@Function.isInternal()`


Determines whether a function is internal.

```code
@Function.isInternal(function $function): bool
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| function | `function`  |  | null |

##### Returns

| Type | Value |
| --- | ---  |
| `bool` |  |




### `@Function.isUserDefined()`


Determines whether a function is user-defined.

```code
@Function.isUserDefined(function $function): bool
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| function | `function`  |  | null |

##### Returns

| Type | Value |
| --- | ---  |
| `bool` |  |




### `@Function.isVariadic()`


Determines whether a function is variadic, meaning it accepts a variable number of arguments.

```code
@Function.isVariadic(function $function): bool
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| function | `function`  |  | null |

##### Returns

| Type | Value |
| --- | ---  |
| `bool` |  |




### `@Function.listParameterNames()`


Lists all parameter names of a function.

```code
@Function.listParameterNames(function $function): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| function | `function`  |  | null |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [name, ...] |




### `@Function.listParameters()`


Lists all parameters of a function with associated default values.

```code
@Function.listParameters(function $function): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| function | `function`  |  | null |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [name: default, ...] |
