private static function array_extend($a, $b) { foreach ($b as $key => $value) { if (!array_key_exists($key, $a)) { $a[$key] = $value; } } }