$() is short for $eval(string,N) it allow you to evaluate a string N or more times.
what you do is make a string with $+() like so:
$+(%,channel.,$chan) which return the string %channel.#channel
however we want the contents of the variable the string represents so we need to force a 2nd evaluation.
$eval($+(%,channel.,$chan),2) or $($+(%,channel.,$chan),2) is the same thing.
$(,1) is the default depth of evaluation so
//echo -a $eval($+(%,myname.,me),1)
is the same as
//echo -a $+(%,myname.,me)

you can stop evaluation by doing \
//echo -a $($+(%,myname.,$me),0)
but as with so many things in life you have a shortcut for that as well
//echo -a $!+(%,myname.,$me)

Php Code:

;setting and getting dynamic variables
alias test { 
  set $+(%,test.,$me) Hello
  echo -a $($+(%,test.,$me),2)
}
 



$maybe