- var_dump: documentation ( source)
- filter_var: documentation ( source)
<?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
]
)
);