UnsetArrayValue
in package
Object that represents the removal of array value while performing [[ArrayHelper::merge()]].
Usage example:
$array1 = [
'ids' => [
1,
],
'validDomains' => [
'example.com',
'www.example.com',
],
];
$array2 = [
'ids' => [
2,
],
'validDomains' => new \yii\helpers\UnsetArrayValue(),
];
$result = \yii\helpers\ArrayHelper::merge($array1, $array2);
The result will be
[
'ids' => [
1,
2,
],
]
Tags
Table of Contents
Methods
- __set_state() : UnsetArrayValue
- Restores class state after using `var_export()`.
Methods
__set_state()
Restores class state after using `var_export()`.
public
static __set_state(array<string|int, mixed> $state) : UnsetArrayValue
Parameters
- $state : array<string|int, mixed>