- array_map: documentation ( source)
- array_filter: documentation ( source)
<?php
function apcu_clear_cache() {}
function wincache_ucache_clear() {}
//function xcache_clear_cache() {}
$user_caches = [
'apcu_clear_cache',
'wincache_ucache_clear',
'xcache_clear_cache',
];
array_map('call_user_func', array_filter($user_caches, 'is_callable'));