Skip to content

Commit

Permalink
need a refactor on ephp_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-rubio committed May 25, 2015
1 parent 308b44a commit 176dcdd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ephp_vars.erl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
%% ------------------------------------------------------------------

start_link() ->
%% FIXME : PHP use a table for variables for hard reference to the
%% values so, when you use a reference, this creates a link
%% to the data instead of a link to the original variable.
%% The behaviour is, when you 'unset' a variable, you only
%% remove the link to the data and, if the data has 0 links
%% then the data is removed.
Ref = make_ref(),
erlang:put(Ref, ?DICT:new()),
{ok, Ref}.
Expand Down

0 comments on commit 176dcdd

Please sign in to comment.