- print_r: documentation ( source)
- array_merge: documentation ( source)
- register_shutdown_function: documentation ( source)
- extract: documentation ( source)
<?php
register_shutdown_function(function () {
$hookInfo = [function () {}];
$hooks[][] = [$hookInfo];
});
$options = [
'sort' => []
];
$defaultOption = ['sort' => []];
$sort = &$options['sort'];
$sort['direction'] = 'asc';
$val = array_merge($defaultOption, $options);
extract($val);
print_r($val);