anchor.diff:          Data = lists:foldl(fun(Chunk,Total) ->
               <<Total/binary, Chunk/binary>>
           end, <<>>, Elements),
  -        Size = ephp_util:to_bin(length(Value)),
  +        Size = case Value of
  +        V when is_list(V) ->
  +            ephp_util:to_bin(length(Value));
  +        #reg_instance{class=#class{attrs=Attrs}} ->
  +            ephp_util:to_bin(length(Attrs))
  +        end,
           if ?IS_DICT(Value) ->
               <<"array(", Size/binary, ") {\n", Data/binary, "}\n">>;
  +        is_record(Value, reg_instance) ->
  +            #reg_instance{class=Class} = Value,
  +            %% TODO: add instance number (ID)
  +            <<"class ", (Class#class.name)/binary, " (", Size/binary, ") ",
  +              "{\n", Data/binary, "}\n">>;
           true ->
               Data
           end;
  
positive.code:     null.
  
  -spec print_r(Context :: context(), Value :: var_value(), Output :: boolean()) -> true | binary().
  
  print_r(_Context, {_,Value}, {_,true}) when not ?IS_DICT(Value) -> 
      ephp_util:to_bin(Value);
  
negative.code: 
  -spec print_r(Context :: context(), Value :: var_value()) -> true | binary().
  
  print_r(Context, {_,#reg_instance{}}=Vars) ->
      print_r(Context, Vars, {false,false});
  
  print_r(_Context, {_,Value}) when not ?IS_DICT(Value) -> 
      ephp_util:to_bin(Value);
  
  