$string = '$thisIsVar $_this_is_var $1_this_is_not_var';
preg_match_all('#(\$[a-zA-Z_]{1}[a-zA-Z0-9_]*)#', $string, $arMatches);
array(2) {
[0]=>
array(2) {
[0]=>
string(10) "$thisIsVar"
[1]=>
string(13) "$_this_is_var"
}
[1]=>
array(2) {
[0]=>
string(10) "$thisIsVar"
[1]=>
string(13) "$_this_is_var"
}
}