php8.5
Home/ Manual/ com / functions/ variant_set

variant_set

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Assigns a new value for a variant object

Description

variant_set(variant $variant, mixed $value): void

Converts value to a variant and assigns it to the variant object; no new variant object is created, and the old value of variant is freed/released.

Parameters

variant

The variant.

value

Return Values

Void

Source: reference/com/functions/variant-set.xml · from the official PHP manual (php/doc-en)