- Output for 8.1.25 - 8.1.31, 8.2.12 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
- NULL
- Output for 8.1.0 - 8.1.24, 8.2.0 - 8.2.11
- array(1) { ["loadPlugins"]=> NULL }
<?php
var_dump(filter_var(
['loadPlugins' => 'test'],
FILTER_CALLBACK,
[
'options' => function ($value) {
if (is_array($value) === true) {
return $value;
} else {
return null;
}
},
'flags' => FILTER_NULL_ON_FAILURE
]
)
);