first of all:
var $mas = array();
in the class does get initialised, when the new object is created i.e. in $temp = new abc;
the initial value of the var $mas is array(), no matter whether it was set in constructor or not.
coming to the point, you should be doing assorting like this:
$this->{$varname}[] = $dat;
which works.
regards,
Daarius...