我想在同一个数组上运行3个本机函数:trim,strtoupper和mysql_real_escape_string.可以这样做吗?
试图将数组作为回调传递这样做是行不通的:
$exclude = array_map(array('trim','strtoupper','mysql_real_escape_string'), explode("\n", variable_get('gs_stats_filter', 'googlebot')));
Run Code Online (Sandbox Code Playgroud)
虽然这很好,因为它只使用一个本机函数作为回调:
$exclude = array_map('trim', explode("\n", variable_get('gs_stats_filter', 'googlebot')));
Run Code Online (Sandbox Code Playgroud)