Two things that would reduce that code down to something that looks more intelligent: [man]references[/man] and the [man]call_user_func_array/man function. For example, you could build an array of references to non-empty arrays like so:
$arrays = array(&$array1, &$array2, &$array3, &$array4);
$arrays = array_filter($arrays);
Now you simply call [man]call_user_func_array/man to invoke the 'array_intersection' filter on the non-empty arrays.